summaryrefslogtreecommitdiff
path: root/_pytest/pastebin.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2011-11-14 17:51:12 +0100
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2011-11-14 17:51:12 +0100
commit69dfc755722ed52b699a23eab5b6d48b4392e556 (patch)
tree39997b0da1c94dcb5642970e56da7ec52a27dec1 /_pytest/pastebin.py
parent9d3e51af9fef83230f376adf3cc7b5253398e3c7 (diff)
downloadpytest-69dfc755722ed52b699a23eab5b6d48b4392e556.tar.gz
test and fix pastebin xmlrpc import name missmatch, fixes #87
Diffstat (limited to '_pytest/pastebin.py')
-rw-r--r--_pytest/pastebin.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/_pytest/pastebin.py b/_pytest/pastebin.py
index 52d7a65e6..6369ee749 100644
--- a/_pytest/pastebin.py
+++ b/_pytest/pastebin.py
@@ -38,7 +38,11 @@ def pytest_unconfigure(config):
del tr._tw.__dict__['write']
def getproxy():
- return py.std.xmlrpclib.ServerProxy(url.xmlrpc).pastes
+ if sys.version_info < (3, 0):
+ from xmlrpclib import ServerProxy
+ else:
+ from xmlrpc.client import ServerProxy
+ return ServerProxy(url.xmlrpc).pastes
def pytest_terminal_summary(terminalreporter):
if terminalreporter.config.option.pastebin != "failed":