From a2da45bb5c6ad630db0a5e72105f8f45da647154 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Sat, 16 Feb 2008 13:30:17 +0000 Subject: [PATCH] Small patches to make backup work and work-around bug #11066 --- src/apps/storetool/bongo/storetool/BackupCommands.py | 2 +- src/libs/python/bongo/store/CommandStream.py | 5 ++++- src/libs/python/bongo/store/StoreClient.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apps/storetool/bongo/storetool/BackupCommands.py b/src/apps/storetool/bongo/storetool/BackupCommands.py index 3d62679..f281371 100644 --- a/src/apps/storetool/bongo/storetool/BackupCommands.py +++ b/src/apps/storetool/bongo/storetool/BackupCommands.py @@ -118,7 +118,7 @@ class StoreBackupCommand(Command): props = docstore.PropGet(document.uid) for key in props.keys(): headerx.SetKey("BONGO.%s" % key, props[key]) - backup_file.write(headerx.ToString()) + backup_file.write(headerx.ToString().encode("utf-8")) # tar files have a 512 byte header (tar_info.tobuf()), and then the content # content is padded to a multiple of 512 bytes diff --git a/src/libs/python/bongo/store/CommandStream.py b/src/libs/python/bongo/store/CommandStream.py index cae6dba..5d86edd 100644 --- a/src/libs/python/bongo/store/CommandStream.py +++ b/src/libs/python/bongo/store/CommandStream.py @@ -43,7 +43,10 @@ class Collection: ret = re.split(r"(?