Skip to content

Commit ac90d19

Browse files
committed
Use six to import xmlrpclib
1 parent 4a4e45b commit ac90d19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pasteopenstack.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/python
22
import sys
3-
from xmlrpclib import ServerProxy
3+
4+
import six
5+
import six.moves.xmlrpc_client as xmlrpclib
46

57
if len(sys.argv) > 1:
68
filename = sys.argv[1]
@@ -10,7 +12,7 @@
1012
filename = 'stdin'
1113
text = sys.stdin.read()
1214

13-
s = ServerProxy('http://paste.openstack.org/xmlrpc/', allow_none=True);
15+
s = xmlrpclib.ServerProxy('http://paste.openstack.org/xmlrpc/', allow_none=True);
1416
id = s.pastes.newPaste(None, text, None, filename)
1517

1618
print('http://paste.openstack.org/show/%s/' % id)

0 commit comments

Comments
 (0)