[pypy-svn] buildbot default: kill the call_subprocess hack
RonnyPfannschmidt
commits-noreply at bitbucket.org
Wed Apr 20 15:53:19 CEST 2011
Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch:
Changeset: r455:54ab0de1f500
Date: 2011-04-18 19:06 +0200
http://bitbucket.org/pypy/buildbot/changeset/54ab0de1f500/
Log: kill the call_subprocess hack
diff --git a/bitbucket_hook/hook.py b/bitbucket_hook/hook.py
--- a/bitbucket_hook/hook.py
+++ b/bitbucket_hook/hook.py
@@ -132,13 +132,12 @@
smtp = self.SMTP(SMTP_SERVER, SMTP_PORT)
smtp.sendmail(from_, [to], msg.as_string())
- call_subprocess = staticmethod(subprocess.call)
def send_irc_message(self, message, test=False):
if test:
print message + '\n'
else:
- return self.call_subprocess([BOT, CHANNEL, message])
+ return subprocess.call([BOT, CHANNEL, message])
def handle(self, payload, test=False):
path = payload['repository']['absolute_url']
diff --git a/bitbucket_hook/test/test_hook.py b/bitbucket_hook/test/test_hook.py
--- a/bitbucket_hook/test/test_hook.py
+++ b/bitbucket_hook/test/test_hook.py
@@ -235,8 +235,8 @@
u'user': u'antocuni',
'commits': commits['commits']}
- handler.call_subprocess = noop
monkeypatch.setattr(hook, 'Popen', mock)
+ monkeypatch.setattr(hook.subprocess, 'call', noop)
handler.SMTP = mock
handler.handle(test_payload)
More information about the Pypy-commit
mailing list