1. Stefan Schwarzer
  2. ftputil


Stefan Schwarzer  committed 092f9bd

Added comment on use of `isdir` instead of `try/except`.

  • Participants
  • Parent commits 5eb53d3
  • Branches default

Comments (0)

Files changed (1)

File ftputil/ftp_sync.py

View file
         if self._target.path.isfile(target_dir):
             raise ftp_error.SyncError("target dir '%s' is actually a file" %
+        # Deliberately use an `isdir` test instead of `try/except`. The
+        #  latter approach might mask other errors we want to see, e. g.
+        #  insufficient permissions.
         if not self._target.path.isdir(target_dir):