Fixed the return type of update_host

This commit is contained in:
Anton Beloglazov 2012-09-27 13:05:42 +10:00
parent d3ffdf5a3e
commit 82c56de835

View File

@ -144,13 +144,13 @@ class Database(object):
ram=ram).inserted_primary_key[0]
log.info('Created a new DB record for a host %s, id=%d',
hostname, id)
return id
return int(id)
else:
self.connection.execute(self.hosts.update().
where(self.hosts.c.id == row['id']).
values(cpu_mhz=cpu_mhz,
ram=ram))
return row['id']
return int(row['id'])
@contract
def select_host_characteristics(self):