inotify: files is always a list: 'files or []' is redundant
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Wed, 08 Apr 2009 13:27:28 +0900
changeset 8067 b084d6d6f345
parent 8066 aece3c9e62f1
child 8068 389e2820280d
inotify: files is always a list: 'files or []' is redundant files comes from match.files() : it always returns a list.
hgext/inotify/__init__.py
hgext/inotify/client.py
--- a/hgext/inotify/__init__.py	Mon Apr 13 21:57:17 2009 +0200
+++ b/hgext/inotify/__init__.py	Wed Apr 08 13:27:28 2009 +0900
@@ -96,7 +96,7 @@
                                        '%s\n') % inst)
                     if query:
                         try:
-                            return query(ui, repo, files or [], match,
+                            return query(ui, repo, files, match,
                                          ignored, clean, unknown)
                         except socket.error, err:
                             ui.warn(_('could not talk to new inotify '
--- a/hgext/inotify/client.py	Mon Apr 13 21:57:17 2009 +0200
+++ b/hgext/inotify/client.py	Wed Apr 08 13:27:28 2009 +0900
@@ -23,7 +23,7 @@
             raise
 
     def genquery():
-        for n in names or []:
+        for n in names:
             yield n
         states = 'almrx!'
         if ignored: