Merge remote-tracking branch 'qubesos/pr/94'

* qubesos/pr/94:
  Fix for bug in VM Settings
This commit is contained in:
Marek Marczykowski-Górecki 2018-05-22 03:51:31 +02:00
commit 85dc0f9083
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -373,6 +373,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
except ValueError:
QtGui.QMessageBox.warning(None, self.tr("Invalid address"),
self.tr("Address '{0}' is invalid.").format(address))
return
if dialog.tcp_radio.isChecked():
rule.proto = 'tcp'
@ -388,6 +389,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
self.tr("Invalid port or service"),
self.tr("Port number or service '{0}' is invalid.")
.format(service))
return
elif service:
try:
rule.dstports = service
@ -399,6 +401,7 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
self.tr("Invalid port or service"),
self.tr("Port number or service '{0}' is invalid.")
.format(service))
return
if row is not None:
self.set_child(row, rule)