git.__remotes_from_dir() should only return lists
authorPavel Roskin <proski@gnu.org>
Wed, 5 Sep 2007 16:57:22 +0000 (12:57 -0400)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 5 Sep 2007 21:21:03 +0000 (22:21 +0100)
If there are no remotes, return empty list, not None.  The later doesn't
work with builtin set().

This fixes t1001-branch-rename.sh

Signed-off-by: Pavel Roskin <proski@gnu.org>
stgit/git.py

index 4b4c626..f847cce 100644 (file)
@@ -953,7 +953,7 @@ def __remotes_from_dir(dir):
     if os.path.exists(d):
         return os.listdir(d)
     else:
-        return None
+        return []
 
 def remotes_list():
     """Return the list of remotes in the repository