Show More
@@ -161,10 +161,13 b" protomap = {'http': httpcheck," | |||||
161 | 'file': filecheck, |
|
161 | 'file': filecheck, | |
162 | } |
|
162 | } | |
163 | def issvnurl(url): |
|
163 | def issvnurl(url): | |
164 | if not '://' in url: |
|
164 | try: | |
165 | return False |
|
165 | proto, path = url.split('://', 1) | |
166 | proto, path = url.split('://', 1) |
|
166 | path = urllib.url2pathname(path) | |
167 | path = urllib.url2pathname(path).replace(os.sep, '/') |
|
167 | except ValueError: | |
|
168 | proto = 'file' | |||
|
169 | path = os.path.abspath(url) | |||
|
170 | path = path.replace(os.sep, '/') | |||
168 | check = protomap.get(proto, lambda p, p2: False) |
|
171 | check = protomap.get(proto, lambda p, p2: False) | |
169 | while '/' in path: |
|
172 | while '/' in path: | |
170 | if check(path, proto): |
|
173 | if check(path, proto): |
General Comments 0
You need to be logged in to leave comments.
Login now