chiark / gitweb /
Use the builtin set() instead of sets.Set()
authorKarl Hasselström <kha@treskal.com>
Mon, 3 Sep 2007 21:48:51 +0000 (23:48 +0200)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 4 Sep 2007 21:00:32 +0000 (22:00 +0100)
We can do that now that we're guaranteed to have Python 2.4 or later.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/git.py

index 885720918c6a4b9415860e8300d73ae6da993e76..4b4c6268197412b5be69543586306ed7d1b595fd 100644 (file)
@@ -26,7 +26,6 @@ from stgit.utils import *
 from stgit.out import *
 from stgit.run import *
 from stgit.config import config
-from sets import Set
 
 # git exception class
 class GitException(Exception):
@@ -959,10 +958,9 @@ def __remotes_from_dir(dir):
 def remotes_list():
     """Return the list of remotes in the repository
     """
-
-    return Set(__remotes_from_config()) | \
-           Set(__remotes_from_dir('remotes')) | \
-           Set(__remotes_from_dir('branches'))
+    return (set(__remotes_from_config())
+            | set(__remotes_from_dir('remotes'))
+            | set(__remotes_from_dir('branches')))
 
 def remotes_local_branches(remote):
     """Returns the list of local branches fetched from given remote