mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix import of ipaddress on PY3
This should only be imported on PY2
This commit is contained in:
parent
0f16821826
commit
2d0e96385f
1 changed files with 6 additions and 2 deletions
|
@ -24,10 +24,14 @@ import salt.grains.core as core
|
|||
|
||||
# Import 3rd-party libs
|
||||
from salt.ext import six
|
||||
if six.PY3:
|
||||
import ipaddress
|
||||
else:
|
||||
import salt.ext.ipaddress as ipaddress
|
||||
|
||||
# Globals
|
||||
IPv4Address = salt.ext.ipaddress.IPv4Address
|
||||
IPv6Address = salt.ext.ipaddress.IPv6Address
|
||||
IPv4Address = ipaddress.IPv4Address
|
||||
IPv6Address = ipaddress.IPv6Address
|
||||
IP4_LOCAL = '127.0.0.1'
|
||||
IP4_ADD1 = '10.0.0.1'
|
||||
IP4_ADD2 = '10.0.0.2'
|
||||
|
|
Loading…
Add table
Reference in a new issue