mirror of
https://github.com/twisterarmy/DarkenedAges.git
synced 2025-03-12 05:21:20 +00:00
Fixed bug when daget.py hash contained '/'
This commit is contained in:
parent
629cd1f9a4
commit
f15204a392
3
daget.py
3
daget.py
@ -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…
x
Reference in New Issue
Block a user