File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 23
23
import time
24
24
import urllib
25
25
import urlparse
26
- import re
26
+ import fnmatch
27
27
28
28
def findpath (parser , s ):
29
29
'''returns (server url, path component)'''
@@ -89,13 +89,8 @@ def main():
89
89
all = sorted (i for i in source if i [0 ] != '_' ) # Skip reserved names.
90
90
if not spath :
91
91
raise parser .error ('source database must be specified' )
92
- elif spath in all :
93
- databases = [(spath , tpath if tpath else spath )]
94
- elif '*' in spath :
95
- check = re .compile (spath .replace ('*' , '.*?' ))
96
- databases = [(i , i ) for i in all if check .match (i )]
97
92
else :
98
- databases = []
93
+ databases = [( i , i ) for i in all if fnmatch . fnmatchcase ( i , spath ) ]
99
94
100
95
if not databases :
101
96
raise parser .error ("no source databases match glob '%s'" % spath )
You can’t perform that action at this time.
0 commit comments