fix: [showpaste] fix: #346, avoid None screenshots

This commit is contained in:
Terrtia 2019-05-06 10:00:39 +02:00
parent 97fa1ddca4
commit cc61c99290
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -44,6 +44,8 @@ def get_item_screenshot_path(item):
screenshot = r_serv_metadata.hget('paste_metadata:{}'.format(item), '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:])
else:
screenshot = ''
return screenshot
def showpaste(content_range, requested_path):