File tree 2 files changed +6
-2
lines changed
netjsonconfig/backends/airos
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
from copy import deepcopy
2
2
from ipaddress import ip_interface
3
3
4
+ import six
5
+
4
6
from ...utils import get_copy
5
7
from ..base .converter import BaseConverter
6
8
from .aaa import bridge_devname , profile_from_interface , status_from_interface
@@ -479,7 +481,7 @@ def to_intermediate(self):
479
481
routes = self .default_routes ()
480
482
original = get_copy (self .netjson , self .netjson_key , [])
481
483
for r in original :
482
- network = ip_interface (r ['destination' ])
484
+ network = ip_interface (six . text_type ( r ['destination' ]) )
483
485
temp = {}
484
486
temp ['ip' ] = str (network .ip )
485
487
temp ['netmask' ] = str (network .netmask )
Original file line number Diff line number Diff line change 1
1
from ipaddress import ip_interface
2
2
3
+ from six import text_type
4
+
3
5
4
6
def autonegotiation (interface ):
5
7
"""
@@ -92,7 +94,7 @@ def split_cidr(address):
92
94
"""
93
95
Return the address in dict format
94
96
"""
95
- network = ip_interface ('{addr}/{mask}' .format (addr = address ['address' ], mask = address ['mask' ]))
97
+ network = ip_interface (text_type ( '{addr}/{mask}' .format (addr = address ['address' ], mask = address ['mask' ]) ))
96
98
return {'ip' : str (network .ip ), 'netmask' : str (network .netmask )}
97
99
98
100
You can’t perform that action at this time.
0 commit comments