Skip to content

Commit

Permalink
Merge branch 'master' of github.com:drunken-pypers/cloudlynt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Shanker B committed Dec 20, 2014
1 parent 0032ccb commit 13dda0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cloudlynt/github/views.py
Expand Up @@ -14,9 +14,13 @@ def download_repo(username, repo):
url = _generate_tar_url(username, repo)
dir_path = "/tmp/{}".format(uuid.uuid4().hex)
os.mkdir(dir_path)
subprocess.call('curl -L {} | tar -xz -C {}'.format(
return_code = subprocess.call('curl -L {} | tar -xz -C {}'.format(
url, dir_path), shell=True)
return "{}/{}-master".format(dir_path, repo)

if not return_code:
return "{}/{}-master".format(dir_path, repo)
else:
return False


def run_flake_on_repo(dir_path):
Expand All @@ -37,5 +41,8 @@ def run_flake_on_repo(dir_path):

def build_lynt(request, username, repo):
dir_path = download_repo(username, repo)
if not dir_path:
return HttpResponse("LOL", status=404)

result = run_flake_on_repo(dir_path)
return HttpResponse(result)
1 change: 1 addition & 0 deletions requirements.txt
@@ -1,3 +1,4 @@
Django==1.7.1
flake8==2.1.0
gunicorn==19
pyflakes==0.8.1

0 comments on commit 13dda0a

Please sign in to comment.