bug fix chunked transfer
[pithos] / tools / store
index c84164f..68f4f9d 100755 (executable)
@@ -47,8 +47,8 @@ import re
 import time as _time
 import os
 
-#DEFAULT_HOST = 'pithos.dev.grnet.gr'
-DEFAULT_HOST = '127.0.0.1:8000'
+DEFAULT_HOST = 'pithos.dev.grnet.gr'
+#DEFAULT_HOST = '127.0.0.1:8000'
 DEFAULT_API = 'v1'
 
 _cli_commands = {}
@@ -685,9 +685,9 @@ def print_usage():
     print '\nCommands:\n' + '\n'.join(sorted(commands))
 
 def print_dict(d, header='name', f=stdout, detail=True):
-    header = header in d and header or 'subdir'
+    header = header if header in d else 'subdir'
     if header and header in d:
-        f.write('%s\n' %d.pop(header))
+        f.write('%s\n' %d.pop(header).encode('utf8'))
     if detail:
         patterns = ['^x_(account|container|object)_meta_(\w+)$']
         patterns.append(patterns[0].replace('_', '-'))