summaryrefslogtreecommitdiffstats
path: root/GitAutoDeploy.py
diff options
context:
space:
mode:
authorAlexander Nestorov <alexandernst@gmail.com>2014-09-18 23:24:47 +0200
committerAlexander Nestorov <alexandernst@gmail.com>2014-09-18 23:24:47 +0200
commit3384c64b59117dc8032cca99884ad6e5cb20dd36 (patch)
treead5836c861865eef64fc64e289b2c6c19a958aa5 /GitAutoDeploy.py
parent53acb7bf0fa4ecbf9006d53c07b9010cd3fcf968 (diff)
downloadGit-Auto-Deploy-3384c64b59117dc8032cca99884ad6e5cb20dd36.zip
Git-Auto-Deploy-3384c64b59117dc8032cca99884ad6e5cb20dd36.tar.gz
Git-Auto-Deploy-3384c64b59117dc8032cca99884ad6e5cb20dd36.tar.bz2
Speed up a little bit Gitlab vs Github parsing
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-xGitAutoDeploy.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index c915c50..7917672 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -48,10 +48,9 @@ class GitAutoDeploy(BaseHTTPRequestHandler):
items = []
# If payload is missing, we assume gitlab syntax.
- if not 'payload' in post:
+ if not 'payload' in post and 'repository' in body:
response = json.loads(body)
- if 'repository' in body:
- items.append(response['repository']['url'])
+ items.append(response['repository']['url'])
# Otherwise, we assume github syntax.
else: