simplify netmaskoption
This commit is contained in:
parent
74d367c731
commit
a248e114de
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ class NetmaskOption(StrOption):
|
|||
val_netmask, val_ip = vals
|
||||
opt_netmask, opt_ip = opts
|
||||
ip = ip_interface('{0}/{1}'.format(val_ip, val_netmask))
|
||||
if not _cidr and current_opt == opt_ip
|
||||
if not _cidr and current_opt == opt_ip:
|
||||
if ip.ip == ip.network.network_address:
|
||||
raise ValueError( _('this is a network with netmask "{0}" ("{1}")'
|
||||
'').format(val_netmask,
|
||||
|
@ -100,5 +100,5 @@ class NetmaskOption(StrOption):
|
|||
opt_ip.impl_get_display_name()))
|
||||
elif ip.ip == ip.network.broadcast_address:
|
||||
raise ValueError(_('IP "{0}" ("{1}") is the broadcast'
|
||||
'')format(val_ip,
|
||||
opt_ip.impl_get_display_name()))
|
||||
'').format(val_ip,
|
||||
opt_ip.impl_get_display_name()))
|
||||
|
|
Loading…
Reference in a new issue