francoislaurent / escale

Escale - Client-to-client synchronization based on external relay storage
Other
3 stars 2 forks source link

OSError "No such file or directory" makes update pushing abort #28

Closed francoislaurent closed 6 years ago

francoislaurent commented 6 years ago

Files were unlinked in the meantime between local repository listing and the call to the checksum method. This made the update abort with recovery, whereas the file could be skipped instead so that the update goes on.

CRITICAL[*]:manager.run: Traceback (most recent call last):
  File "escale/manager/manager.py", line 302, in run
    new |= self.upload()
  File "escale/manager/index.py", line 177, in upload
    checksum = self.checksum(resource)
  File "escale/manager/manager.py", line 575, in checksum
    mtime = int(os.path.getmtime(local_file))
  File "/usr/lib/python2.7/genericpath.py", line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: ...