mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
merge with branch issue-163
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
# changegroup.scm = python:scmhooks.callback
|
||||
#
|
||||
|
||||
import os, urllib
|
||||
import os, urllib, urllib2
|
||||
|
||||
baseUrl = os.environ['SCM_URL']
|
||||
challenge = os.environ['SCM_CHALLENGE']
|
||||
@@ -51,7 +51,7 @@ def callback(ui, repo, hooktype, node=None, source=None, pending=None, **kwargs)
|
||||
url = baseUrl + hooktype
|
||||
ui.debug( "send scm-hook to " + url + " and " + node + "\n" )
|
||||
data = urllib.urlencode({'node': node, 'challenge': challenge, 'credentials': credentials, 'repositoryPath': repo.root})
|
||||
conn = urllib.urlopen(url, data);
|
||||
conn = urllib2.urlopen(url, data);
|
||||
if conn.code >= 200 and conn.code < 300:
|
||||
ui.debug( "scm-hook " + hooktype + " success with status code " + str(conn.code) + "\n" )
|
||||
failure = False
|
||||
|
||||
Reference in New Issue
Block a user