File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
netjsonconfig/backends/airos Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11from copy import deepcopy
22from ipaddress import ip_interface
3+ import six
34
45from ...utils import get_copy
56from ..base .converter import BaseConverter
@@ -479,7 +480,7 @@ def to_intermediate(self):
479480 routes = self .default_routes ()
480481 original = get_copy (self .netjson , self .netjson_key , [])
481482 for r in original :
482- network = ip_interface (r ['destination' ])
483+ network = ip_interface (six . text_type ( r ['destination' ]) )
483484 temp = {}
484485 temp ['ip' ] = str (network .ip )
485486 temp ['netmask' ] = str (network .netmask )
Original file line number Diff line number Diff line change 11from ipaddress import ip_interface
2+ from six import text_type
23
34
45def autonegotiation (interface ):
@@ -92,7 +93,7 @@ def split_cidr(address):
9293 """
9394 Return the address in dict format
9495 """
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' ]) ))
9697 return {'ip' : str (network .ip ), 'netmask' : str (network .netmask )}
9798
9899
You can’t perform that action at this time.
0 commit comments