From c79309e091b6e8d2d345089e90e32ed5d0bb7c81 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 9 Mar 2018 11:13:05 +0100 Subject: [PATCH] edit some import to be compatible with python 2.7 --- ptyt_upload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ptyt_upload.py b/ptyt_upload.py index e9cfdfa..0e381c4 100755 --- a/ptyt_upload.py +++ b/ptyt_upload.py @@ -17,10 +17,13 @@ Options: --version Show version. """ from os.path import dirname, realpath -from sys.path import insert +import sys from docopt import docopt +# Allows you to a relative import from the parent folder +sys.path.insert(0, dirname(realpath(__file__)) + "/lib") + import yt_upload import pt_upload @@ -50,8 +53,6 @@ def validateVideo(path): if __name__ == '__main__': - # Allows you to a relative import from the parent folder - insert(0, dirname(realpath(__file__)) + "/lib") options = docopt(__doc__, version=VERSION)