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