Merge "Python 3: do not index a dict_values object"

This commit is contained in:
Jenkins 2015-06-08 09:35:22 +00:00 committed by Gerrit Code Review
commit 7c3a018c86
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class OvsdbIdl(api.API):
@property
def _ovs(self):
return self._tables['Open_vSwitch'].rows.values()[0]
return list(self._tables['Open_vSwitch'].rows.values())[0]
def transaction(self, check_error=False, log_errors=True, **kwargs):
return Transaction(self, OvsdbIdl.ovsdb_connection,

View File

@ -143,7 +143,7 @@ class DbGetCommand(DbCommand):
DbCommand.result.fset(self, val)
# DbCommand will return [{'column': value}] and we just want value.
if self._result:
self._result = self._result[0].values()[0]
self._result = list(self._result[0].values())[0]
class BrExistsCommand(DbCommand):