Remove wild comments, only accept events for files that are non-empty
@@ -29,17 +29,11 @@ class UploadJob(threading.Thread):
save_path = self.path
if self.copy:
save_path = self.path + '.tmp'
- # LB: Why does this happen? CVP told me to put this here
- #if (os.path.getsize(save_path) == 0):
- # return
shutil.copy2(self.path, save_path)
-
self._push_function(self.save_name, save_path)
if self.copy:
os.remove(save_path)
#wandb.termlog('Done uploading file: %s' % self.save_name)
- #except OSError as e:
- # pass
finally:
self._done_queue.put(EventJobDone(self))
@@ -125,6 +119,7 @@ class FilePusher(object):
self._start_job(save_name, path, copy)
def file_changed(self, save_name, path, copy=False):
+ if os.path.getsize(path) != 0:
self._queue.put(EventFileChanged(path, save_name, copy))
def finish(self):
