From cc61c99290900b164a11da49de608d2adc3c8286 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Mon, 6 May 2019 10:00:39 +0200 Subject: [PATCH] fix: [showpaste] fix: #346, avoid None screenshots --- var/www/modules/showpaste/Flask_showpaste.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/www/modules/showpaste/Flask_showpaste.py b/var/www/modules/showpaste/Flask_showpaste.py index 474280b5..b94a1073 100644 --- a/var/www/modules/showpaste/Flask_showpaste.py +++ b/var/www/modules/showpaste/Flask_showpaste.py @@ -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):