From 45b822a3350638ad87138028b80e3df27663aede Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Sun, 27 Oct 2013 14:05:00 -0700 Subject: [PATCH] Fix code --- fabfile.py | 4 ++++ readthedocs/core/views.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fabfile.py b/fabfile.py index f5e6d8bdadb..b4cdc44b4d7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -27,6 +27,10 @@ def nginx_logs(): env.user = "root" run("tail -f /var/log/nginx/*.log") +@hosts(['newasgard.readthedocs.com', 'newchimera.readthedocs.com']) +def logs(): + env.user = "docs" + run("tail -f %s/logs/*.log" % env.code_dir) @hosts(['localhost']) def i18n(): diff --git a/readthedocs/core/views.py b/readthedocs/core/views.py index f5f091bd8f1..4366a168f96 100644 --- a/readthedocs/core/views.py +++ b/readthedocs/core/views.py @@ -157,7 +157,7 @@ def bitbucket_build(request): if request.method == 'POST': obj = json.loads(request.POST['payload']) rep = obj['repository'] - branches = [rec['branch'] for rec in json['payload']['commits']] + branches = [rec['branch'] for rec in obj['commits']] ghetto_url = "%s%s" % ("bitbucket.org", rep['absolute_url'].rstrip('/')) log.info("(Incoming Bitbucket Build) %s [%s]" % (ghetto_url, ' '.join(branches))) _build_url(ghetto_url, branches)