|
|
36ae71 |
commit 48b6c1b7d3bce22f820c646497ccd617f06d336c
|
|
|
36ae71 |
Author: Jiri Popelka <jpopelka@redhat.com>
|
|
|
36ae71 |
Date: Thu Jan 16 13:57:57 2014 +0100
|
|
|
36ae71 |
|
|
|
36ae71 |
firewall-config: richRuleDialogActionRejectTypeCombobox handling (RHBZ#1054120)
|
|
|
36ae71 |
|
|
|
36ae71 |
ammends d737d69067
|
|
|
36ae71 |
|
|
|
36ae71 |
diff --git a/src/firewall-config b/src/firewall-config
|
|
|
36ae71 |
index 07b3030..91baab6 100755
|
|
|
36ae71 |
--- a/src/firewall-config
|
|
|
36ae71 |
+++ b/src/firewall-config
|
|
|
36ae71 |
@@ -2200,15 +2200,16 @@ class FirewallConfig(object):
|
|
|
36ae71 |
elif type(old_obj.action) == Rich_Reject:
|
|
|
36ae71 |
action = "reject"
|
|
|
36ae71 |
self.richRuleDialogActionRejectTypeCombobox.remove_all()
|
|
|
36ae71 |
- for icmp in REJECT_TYPES[old_obj.family]:
|
|
|
36ae71 |
- self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
- append(icmp, icmp)
|
|
|
36ae71 |
- if old_obj.action.type:
|
|
|
36ae71 |
- self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
- set_active_id(old_obj.action.type)
|
|
|
36ae71 |
- else:
|
|
|
36ae71 |
- self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
- set_active_id(REJECT_TYPES[old_obj.family][0])
|
|
|
36ae71 |
+ if old_obj.family != None:
|
|
|
36ae71 |
+ for icmp in REJECT_TYPES[old_obj.family]:
|
|
|
36ae71 |
+ self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
+ append(icmp, icmp)
|
|
|
36ae71 |
+ if old_obj.action.type:
|
|
|
36ae71 |
+ self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
+ set_active_id(old_obj.action.type)
|
|
|
36ae71 |
+ else:
|
|
|
36ae71 |
+ self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
+ set_active_id(REJECT_TYPES[old_obj.family][0])
|
|
|
36ae71 |
elif type(old_obj.action) == Rich_Drop:
|
|
|
36ae71 |
action = "drop"
|
|
|
36ae71 |
combobox_select_text(self.richRuleDialogActionCombobox, action)
|
|
|
36ae71 |
@@ -2684,7 +2685,8 @@ class FirewallConfig(object):
|
|
|
36ae71 |
for icmp in REJECT_TYPES[family]:
|
|
|
36ae71 |
self.richRuleDialogActionRejectTypeCombobox.append(icmp, icmp)
|
|
|
36ae71 |
old_obj = self.richRuleDialog.old_obj
|
|
|
36ae71 |
- if old_obj and old_obj.family == family and old_obj.action.type:
|
|
|
36ae71 |
+ if old_obj and old_obj.family == family and \
|
|
|
36ae71 |
+ hasattr(old_obj.action, 'type') and old_obj.action.type:
|
|
|
36ae71 |
self.richRuleDialogActionRejectTypeCombobox. \
|
|
|
36ae71 |
set_active_id(old_obj.action.type)
|
|
|
36ae71 |
else:
|