1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Fix ifupdown2 dpkg-configure error during build

Ticket:
Reviewed By: sergey
Testing Done:

dpkg-configure during build seems to be picking up python2.6 and
python2.6 was complaining about the syntax. Fixed with syntax
compatible with python2.6
This commit is contained in:
roopa
2014-04-23 14:36:47 -07:00
parent c778afebc3
commit 07a8db37f9

View File

@ -128,8 +128,7 @@ class ifaceJsonEncoder(json.JSONEncoder):
def default(self, o):
retconfig = {}
if o.config:
retconfig = {k: (v[0] if len(v) == 1 else v)
for k,v in o.config.items()}
retconfig = dict((k, (v[0] if len(v) == 1 else v)) for k,v in o.config.items())
return OrderedDict({'name' : o.name,
'addr_method' : o.addr_method,
'addr_family' : o.addr_family,