From 2f9ea8f049f1c98426bb6bb75862ceecb03b7903 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 21 May 2015 16:13:18 +0100 Subject: [PATCH] Fix reporting of unsupported inotify on Windows XP. Signed-off-by: Daira Hopwood --- src/allmydata/frontends/drop_upload.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index 84df4f97..a2bd853a 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -9,6 +9,7 @@ from twisted.application import service from allmydata.interfaces import IDirectoryNode, NoSuchChildError, ExistingChildError +from allmydata.util import log from allmydata.util.fileutil import abspath_expanduser_unicode, precondition_abspath from allmydata.util.encodingutil import listdir_unicode, to_filepath, \ unicode_from_filepath, quote_local_unicode_path, FilenameEncodingError @@ -26,8 +27,8 @@ def get_inotify_module(): raise NotImplementedError("filesystem notification needed for drop-upload is not supported.\n" "This currently requires Linux or Windows.") return inotify - except ImportError as e: - self.log(e) + except (ImportError, AttributeError) as e: + log.msg(e) if sys.platform == "win32": raise NotImplementedError("filesystem notification needed for drop-upload is not supported.\n" "Windows support requires at least Vista, and has only been tested on Windows 7.") -- 2.45.2