[pypy-svn] buildbot default: use module import for the hook, so we can import app in hook

RonnyPfannschmidt commits-noreply at bitbucket.org
Wed Apr 20 15:53:25 CEST 2011


Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: 
Changeset: r462:b2ffaeb67574
Date: 2011-04-19 09:40 +0200
http://bitbucket.org/pypy/buildbot/changeset/b2ffaeb67574/

Log:	use module import for the hook, so we can import app in hook

diff --git a/bitbucket_hook/main.py b/bitbucket_hook/main.py
--- a/bitbucket_hook/main.py
+++ b/bitbucket_hook/main.py
@@ -16,8 +16,7 @@
 
 app = flask.Flask('bb-hook')
 
-
-from hook import BitbucketHookHandler
+import hook
 
 HOST_NAME = 'codespeak.net'
 PORT_NUMBER = 9237
@@ -41,7 +40,7 @@
 def handle_payload():
     payload = json.loads(flask.request.form['payload'])
     try:
-        handler = BitbucketHookHandler()
+        handler = hook.BitbucketHookHandler()
         handler.handle(payload)
     except:
         traceback.print_exc()


More information about the Pypy-commit mailing list