]> granicus.if.org Git - python/commitdiff
using clearer syntax
authorTarek Ziadé <ziade.tarek@gmail.com>
Sun, 4 Jan 2009 10:37:52 +0000 (10:37 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Sun, 4 Jan 2009 10:37:52 +0000 (10:37 +0000)
Lib/distutils/command/sdist.py

index e10e25b37d5f7a58b28873b17fc42eae0cc70182..27883fd68b92bf975595f4cc70e9c5b43f8a067b 100644 (file)
@@ -358,8 +358,13 @@ class sdist (Command):
 
         # pruning out vcs directories
         # both separators are used under win32
-        seps = sys.platform == 'win32' and r'/|\\' or '/'
-        vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs']
+        if sys.platform == 'win32':
+            seps = r'/|\\'
+        else:
+            seps = '/'
+
+        vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr',
+                    '_darcs']
         vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps)
         self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)