Firewall GUI fix

Fixed error when service would be left empty, but the settings window
would nonetheless emit an error.
This commit is contained in:
Marta Marczykowska-Górecka 2017-11-09 16:11:03 +01:00
parent b9e4f99fec
commit 3f7f5a9da3
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -386,7 +386,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
self.tr("Invalid port or service"),
self.tr("Port number or service '{0}' is invalid.")
.format(service))
elif service is not None:
elif service is not None and service != "":
try:
rule.dstports = service
except (TypeError, ValueError) as ex: