Rejects bad import url for github

This commit is contained in:
Ciaran Gultnieks 2012-09-18 10:06:34 +01:00
parent a11d55620b
commit f0c6402062

View file

@ -126,6 +126,9 @@ def main():
if url.startswith('https://github.com'): if url.startswith('https://github.com'):
if url.endswith('/'): if url.endswith('/'):
url = url[:-1] url = url[:-1]
if url.endswith('.git'):
print "A github URL should point to the project, not the git repo"
sys.exit(1)
projecttype = 'github' projecttype = 'github'
repo = url + '.git' repo = url + '.git'
repotype = 'git' repotype = 'git'