synchronization with osgameclones
This commit is contained in:
@ -160,8 +160,8 @@ def parse_entry(content):
|
||||
for field in ['home', 'download', 'play', 'code repository']:
|
||||
if field in info:
|
||||
for url in info[field]:
|
||||
if not (url.startswith('http://') or url.startswith('https://') or url.startswith('git://') or url.startswith('svn://')):
|
||||
raise RuntimeError('URL "{}" in entry "{}" does not start with http'.format(url, info['name']))
|
||||
if not any([url.startswith(x) for x in ['http://', 'https://', 'git://', 'svn://', 'ftp://']]):
|
||||
raise RuntimeError('URL "{}" in entry "{}" does not start with http/https/git/svn/ftp'.format(url, info['name']))
|
||||
if ' ' in url:
|
||||
raise RuntimeError('URL "{}" in entry "{}" contains a space'.format(url, info['name']))
|
||||
|
||||
|
@ -269,7 +269,7 @@ def unzip(zip_file, destination_directory):
|
||||
|
||||
|
||||
def strip_url(url):
|
||||
for prefix in ('http://', 'https://', 'www.'):
|
||||
for prefix in ('http://', 'https://', 'svn://', 'www.'):
|
||||
if url.startswith(prefix):
|
||||
url = url[len(prefix):]
|
||||
for suffix in ('/', '.git', '/en', '/index.html'):
|
||||
|
Reference in New Issue
Block a user