Browse Source

Fixed bug when daget.py hash contained '/'

master
The Dod 10 years ago
parent
commit
f15204a392
  1. 3
      daget.py

3
daget.py

@ -21,11 +21,12 @@ def todarkive(s,folder,filename): @@ -21,11 +21,12 @@ def todarkive(s,folder,filename):
sys.stderr.write('# Wrote file: {}\n'.format(filename))
def daget(pasteid):
pasteid = pasteid.split('/')[-1] # in case it's a full url
if '#' in pasteid:
p,needhash = pasteid.split('#')
else:
p,needhash = pasteid,None
# Split *after* we split by "#" (sometimes hash contains /).
p = p.split('/')[-1] # in case it's a full url
sys.stderr.write('# getting paste {}\n'.format(p))
payload = pasteclient.sloppy_get(p)
if not payload:

Loading…
Cancel
Save