Skip to content

Commit 42ec5d1

Browse files
committed
ADds scripts to upload to paste.opebstack.org from teh command line
1 parent 31883a0 commit 42ec5d1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pasteopenstack.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/python
2+
import sys
3+
from xmlrpclib import ServerProxy
4+
5+
filename = sys.argv[1]
6+
7+
with open(filename, 'rb') as f:
8+
text = f.read()
9+
10+
s = ServerProxy('http://paste.openstack.org/xmlrpc/', allow_none=True);
11+
id = s.pastes.newPaste(None, text, None, filename)
12+
13+
print 'http://paste.openstack.org/show/%s/' % id
14+

0 commit comments

Comments
 (0)