mirror of https://github.com/CIRCL/AIL-framework
fix: [showpaste] fix: #346, avoid None screenshots
parent
97fa1ddca4
commit
cc61c99290
|
@ -44,6 +44,8 @@ def get_item_screenshot_path(item):
|
||||||
screenshot = r_serv_metadata.hget('paste_metadata:{}'.format(item), 'screenshot')
|
screenshot = r_serv_metadata.hget('paste_metadata:{}'.format(item), 'screenshot')
|
||||||
if screenshot:
|
if screenshot:
|
||||||
screenshot = os.path.join(screenshot[0:2], screenshot[2:4], screenshot[4:6], screenshot[6:8], screenshot[8:10], screenshot[10:12], screenshot[12:])
|
screenshot = os.path.join(screenshot[0:2], screenshot[2:4], screenshot[4:6], screenshot[6:8], screenshot[8:10], screenshot[10:12], screenshot[12:])
|
||||||
|
else:
|
||||||
|
screenshot = ''
|
||||||
return screenshot
|
return screenshot
|
||||||
|
|
||||||
def showpaste(content_range, requested_path):
|
def showpaste(content_range, requested_path):
|
||||||
|
|
Loading…
Reference in New Issue