From d60efa14784582118491fe6e27a21c6b422fd0c5 Mon Sep 17 00:00:00 2001 From: arpit551 Date: Sun, 12 Apr 2020 23:14:42 +0530 Subject: [PATCH] thumbor: Fix __file__ typo. Replaced '__file__' typo with __file__ which used to add wrong path to sys.path. --- zerver/lib/thumbnail.py | 2 +- zthumbor/loaders/helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/thumbnail.py b/zerver/lib/thumbnail.py index ef76893886..9ee9517430 100644 --- a/zerver/lib/thumbnail.py +++ b/zerver/lib/thumbnail.py @@ -8,7 +8,7 @@ from django.conf import settings from django.utils.http import is_safe_url from libthumbor import CryptoURL -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath('__file__')))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from zthumbor.loaders.helpers import ( diff --git a/zthumbor/loaders/helpers.py b/zthumbor/loaders/helpers.py index 9f68114ed7..615e4d77c8 100644 --- a/zthumbor/loaders/helpers.py +++ b/zthumbor/loaders/helpers.py @@ -6,7 +6,7 @@ import re import sys from typing import Any, Text, Tuple, Optional -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath('__file__')))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) # Piece of code below relating to secrets conf has been duplicated with that of