git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d73576
)
dont use icmp_type if values are None
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 23 May 2012 16:19:48 +0000
(12:19 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 23 May 2012 16:19:53 +0000
(12:19 -0400)
sfa/openstack/security_group.py
patch
|
blob
|
history
diff --git
a/sfa/openstack/security_group.py
b/sfa/openstack/security_group.py
index
33c6274
..
99f07f0
100644
(file)
--- a/
sfa/openstack/security_group.py
+++ b/
sfa/openstack/security_group.py
@@
-30,8
+30,6
@@
class SecurityGroup:
to_port = int(ports[1])
else:
from_port = to_port = int(ports[0])
- else:
- from_port = to_port = None
return (from_port, to_port)
def _validate_icmp_type_code(self, icmp_type_code):
@@
-53,7
+51,7
@@
class SecurityGroup:
from_port, to_port = self._validate_port_range(port_range)
icmp_type = self._validate_icmp_type_code(icmp_type_code)
- if icmp_type:
+ if icmp_type
and icmp_type[0] and icmp_type[1]
:
from_port, to_port = icmp_type[0], icmp_type[1]
if group_name: