minor advances in show PDS stats

This commit is contained in:
Richard Hartmann 2015-01-27 19:15:36 +01:00
parent 0030b7c8bb
commit 3a8ffe62ea
2 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import os
import sys
import shutil
import traceback
import pickle
if sys.version_info[0] == 2:
# fixes keyword problems with python 2.x
@ -182,6 +183,11 @@ class PersistentDataStructure(object):
sys.stdout.flush()
if recursive:
for k in self.sub_data_keys:
if isinstance(k, bytes):
k = pickle.loads(k)
print("show stat for subdata with key {}".format(k))
with self.getData(k) as subdata:
subdata.show_stat(recursive = recursive,
prepend = prepend + "->")

View file

@ -91,4 +91,7 @@ class PersistentData_Server(JobManager_Server):
a_bin = data_as_binary_key(a)
if self.overwrite or (not a_bin in self.pds):
JobManager_Server.put_arg(self, a)
return True
return False