From c01e862bc2badb96ab48dedaa9ec194280ae2ac4 Mon Sep 17 00:00:00 2001 From: neingeist Date: Wed, 11 Jul 2018 14:04:01 +0200 Subject: [PATCH] raise RuntimeError to support Python 3 --- drive-download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drive-download.py b/drive-download.py index 42abded..b940585 100644 --- a/drive-download.py +++ b/drive-download.py @@ -1,6 +1,7 @@ FOLDER = '1J_Yw3ENBfDOEjiPV2LpYIa86aAPnaVx3' import os +import shlex from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive @@ -18,4 +19,4 @@ for file1 in file_list: if not os.path.exists(local_filename): file1.GetContentFile(local_filename) else: - raise "{} exists".format(local_filename) + raise RuntimeError("{} exists".format(shlex.quote(local_filename)))