[pypy-svn] buildbot default: resuffle some imports to avoid dependencies
RonnyPfannschmidt
commits-noreply at bitbucket.org
Thu Apr 21 10:02:35 CEST 2011
Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch:
Changeset: r486:5c6eb036a25d
Date: 2011-04-21 10:02 +0200
http://bitbucket.org/pypy/buildbot/changeset/5c6eb036a25d/
Log: resuffle some imports to avoid dependencies
diff --git a/bitbucket_hook/main.py b/bitbucket_hook/main.py
--- a/bitbucket_hook/main.py
+++ b/bitbucket_hook/main.py
@@ -15,9 +15,8 @@
import py
-app = flask.Flask('bb-hook')
+app = flask.Flask(__name__)
-from . import hook
@app.route('/', methods=['GET'])
@@ -41,6 +40,7 @@
def handle_payload():
payload = json.loads(flask.request.form['payload'])
try:
+ from . import hook
hook.handle(payload, test=app.testing)
except:
traceback.print_exc()
diff --git a/bitbucket_hook/test_hook_testcall.py b/bitbucket_hook/test_hook_testcall.py
--- a/bitbucket_hook/test_hook_testcall.py
+++ b/bitbucket_hook/test_hook_testcall.py
@@ -1,10 +1,10 @@
import os
-from bitbucket_hook.hook import handle
-from bitbucket_hook.main import app
import py
def test_handlecall():
+ from bitbucket_hook.hook import handle
+ from bitbucket_hook.main import app
repopath = os.path.dirname(os.path.dirname(__file__))
print 'Repository path:', repopath
test_payload = {u'repository': {u'absolute_url': '',
More information about the Pypy-commit
mailing list