[PATCH 3 of 3] inotify: Do not raise TypeError when client.query returns None
Nicolas Dumazet
nicdumz at gmail.com
Wed Apr 8 00:18:00 CDT 2009
# HG changeset patch
# User Nicolas Dumazet <nicdumz.commits at gmail.com>
# Date 1239167718 -32400
# Node ID 8c69a6f7ff772397b26d8a71da2b1787b6adcace
# Parent d618b5fbddedfca6c4598cb6ac221de065faa71b
inotify: Do not raise TypeError when client.query returns None
When something went wrong in client.query, it returns None.
If inotify.debug=True, we will attempt in this case a zip(A, None, B), which
would raise a TypeError.
diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py
--- a/hgext/inotify/__init__.py
+++ b/hgext/inotify/__init__.py
@@ -58,7 +58,7 @@
if not ignored and not self.inotifyserver:
result = client.query(ui, repo, files, match, False,
clean, unknown)
- if ui.config('inotify', 'debug'):
+ if result and ui.config('inotify', 'debug'):
r2 = super(inotifydirstate, self).status(
match, False, clean, unknown)
for c,a,b in zip('LMARDUIC', result, r2):
More information about the Mercurial-devel
mailing list