Fix issue with parsing the returns and thinking that the load.p was a

host
This commit is contained in:
Thomas S Hatch 2011-03-08 22:06:54 -07:00
parent e4354242c5
commit e03bb7b29a
2 changed files with 3 additions and 1 deletions

View file

@ -77,6 +77,8 @@ class LocalClient(object):
# Wait for the hosts to check in
while True:
for fn_ in os.listdir(jid_dir):
if fn_.startswith('.'):
continue
if not ret.has_key(fn_):
ret[fn_] = pickle.loads(open(os.path.join(jid_dir,
fn_, 'return.p'), 'r'))

View file

@ -143,7 +143,7 @@ class ReqServer(threading.Thread):
jid_dir = os.path.join(jid_root, jid)
if not os.path.isdir(jid_dir):
os.makedirs(jid_dir)
pickle.dump(load, open(os.path.join(jid_dir, 'load.p'), 'w+'))
pickle.dump(load, open(os.path.join(jid_dir, '.load.p'), 'w+'))
else:
return self._prep_jid(load)
return jid