Changeset 1802:cb4ed831f41e


Ignore:
Timestamp:
Jun 10, 2019, 10:17:26 PM (3 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Add another reason for race condition

The more likely reason for a race condition would be removal of
the helper file. All in all, that's still quite unlikely. ;-)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1745 r1802  
    1 # Copyright (C) 2002-2018, Stefan Schwarzer <sschwarzer@sschwarzer.net>
     1# Copyright (C) 2002-2019, Stefan Schwarzer <sschwarzer@sschwarzer.net>
    22# and ftputil contributors (see `doc/contributors.txt`)
    33# See the file LICENSE for licensing terms.
     
    399399            self.unlink(helper_file_name)
    400400        except ftputil.error.FTPOSError:
    401             # If we got a `TimeShiftError` exception above, we should't
    402             # come here: if we did not get a `TimeShiftError` above,
    403             # deletion should be possible. The only reason for an exception
    404             # I can think of here is a race condition by removing write
    405             # permission from the directory or helper file after it has been
    406             # written to.
     401            # If we got a `TimeShiftError` exception above, we
     402            # should't come here: if we didn't get a `TimeShiftError`
     403            # above, deletion should be possible. The only reason for
     404            # an exception I can think of here is a race condition by
     405            # removing the helper file or write permission from the
     406            # directory or helper file after it has been written to.
    407407            raise ftputil.error.TimeShiftError(
    408408                    "could write helper file but not unlink it")
Note: See TracChangeset for help on using the changeset viewer.