Use bytes and bytearray restore database
Since changeset dca8bcce5c30, it is bytes or bytearray that is used instead of buffer. issue4761 review11241002
This commit is contained in:
1 parent
d525e5d6cd
commit
cb89cabb9d
1 file changed
+2
-1
+2
-1
@@ -1314,8 +1314,9 @@ class Main(object):
|
||||
with open(filename, 'rb') as file_p:
|
||||
data = file_p.read()
|
||||
host, port = url.rsplit(':', 1)
|
||||
cast = bytearray if bytes == str else bytes
|
||||
rpcprogress = common.RPCProgress('db_exec', (host, int(port),
|
||||
'restore', dbname, passwd, buffer(data), update))
|
||||
'restore', dbname, passwd, cast(data), update))
|
||||
try:
|
||||
res = rpcprogress.run(False)
|
||||
except TrytonServerError, exception:
|
||||
|
||||
Reference in new issue
Block a user