diff options
author | Alexander Nestorov <alexandernst@gmail.com> | 2014-09-18 23:24:47 +0200 |
---|---|---|
committer | Alexander Nestorov <alexandernst@gmail.com> | 2014-09-18 23:24:47 +0200 |
commit | 3384c64b59117dc8032cca99884ad6e5cb20dd36 (patch) | |
tree | ad5836c861865eef64fc64e289b2c6c19a958aa5 /GitAutoDeploy.py | |
parent | 53acb7bf0fa4ecbf9006d53c07b9010cd3fcf968 (diff) | |
download | Git-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-x | GitAutoDeploy.py | 5 |
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: |