Skip to content

Commit

Permalink
Switch gateway to string
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tran committed Apr 29, 2016
1 parent 10d9c88 commit 3c2d31c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NetworkAdapter:
'netmask': {'type': 'IP'},
'network': {'type': 'IP'},
'broadcast': {'type': 'IP'},
'gateway': {'type': 'IP'},
'gateway': {'type': str},
'nameservers': {'type': list},
'bridge-opts': {'type': dict},
'addrFam': {'in': ['inet', 'inet6', 'ipx']},
Expand Down
3 changes: 2 additions & 1 deletion interfacesReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def _parse_details(self, line):
elif sline[0] == 'netmask':
self._adapters[self._context].setNetmask(sline[1])
elif sline[0] == 'gateway':
self._adapters[self._context].setGateway(sline[1])
ud = sline.pop(0)
self._adapters[self._context].setGateway(' '.join(sline))
elif sline[0] == 'broadcast':
self._adapters[self._context].setBroadcast(sline[1])
elif sline[0] == 'network':
Expand Down

0 comments on commit 3c2d31c

Please sign in to comment.