Pastebin: Replace gist with termbin
gist is no more :(
Clement Lefebvre
5 years ago
21 | 21 |
content = str_args
|
22 | 22 |
|
23 | 23 |
if content != "":
|
24 | |
for paster in ['/usr/bin/gist-paste', '/usr/bin/fpaste']:
|
25 | |
if os.path.exists(paster):
|
26 | |
p = subprocess.Popen([paster], stdin=subprocess.PIPE)
|
27 | |
p.communicate(content.encode("UTF-8"))
|
|
24 |
if os.path.exists('/usr/bin/fpaste'):
|
|
25 |
p = subprocess.Popen(['/usr/bin/fpaste'], stdin=subprocess.PIPE)
|
|
26 |
p.communicate(content.encode("UTF-8"))
|
|
27 |
else:
|
|
28 |
p = subprocess.Popen(['nc', 'termbin.com', '9999'], stdin=subprocess.PIPE)
|
|
29 |
p.communicate(content.encode("UTF-8"))
|