diff options
author | Sebastien Martini <seb@dbzteam.org> | 2009-06-10 15:38:57 +0200 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2009-06-10 15:38:57 +0200 |
commit | 6c5f348a4bd4c452a131da77f898253da9fc8b83 (patch) | |
tree | 4514c01ca0e5b4982ca374e85e29139bbd485bb6 | |
parent | 5bcb4658a87fd5ce52232bb8f215bf342ead19e5 (diff) | |
download | pyinotify-6c5f348a4bd4c452a131da77f898253da9fc8b83.tar.gz |
Improved error message in method _SysProcessEvent.process_IN_MOVE_SELF
-rwxr-xr-x | pyinotify.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pyinotify.py b/pyinotify.py index 4b3c21f..b4f0539 100755 --- a/pyinotify.py +++ b/pyinotify.py @@ -708,11 +708,17 @@ class _SysProcessEvent(_ProcessEvent): if mv_: watch_.path = mv_[0] else: - log.error("The path %s of this watch %s is not reliable anymore", - watch_.path, watch_) - if not watch_.path.endswith('-wrong-path'): - watch_.path += '-wrong-path' - # FIXME: should we pass the cookie even if this is not standart? + log.error("The pathname '%s' of this watch %s has probably changed " + "and couldn't be updated, so it cannot be trusted " + "anymore. To fix this error move directories/files only " + "between watched parents directories, in this case eg. " + "put a watch on '%s'.", + watch_.path, watch_, + os.path.normpath(os.path.join(watch_.path, + os.path.pardir))) + if not watch_.path.endswith('-unknown-path'): + watch_.path += '-unknown-path' + # FIXME: should we pass the cookie even if this is not standard? return self.process_default(raw_event) def process_IN_Q_OVERFLOW(self, raw_event): |