raise RuntimeError to support Python 3

master
neingeist 6 years ago
parent ae90c64885
commit c01e862bc2

@ -1,6 +1,7 @@
FOLDER = '1J_Yw3ENBfDOEjiPV2LpYIa86aAPnaVx3' FOLDER = '1J_Yw3ENBfDOEjiPV2LpYIa86aAPnaVx3'
import os import os
import shlex
from pydrive.auth import GoogleAuth from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive from pydrive.drive import GoogleDrive
@ -18,4 +19,4 @@ for file1 in file_list:
if not os.path.exists(local_filename): if not os.path.exists(local_filename):
file1.GetContentFile(local_filename) file1.GetContentFile(local_filename)
else: else:
raise "{} exists".format(local_filename) raise RuntimeError("{} exists".format(shlex.quote(local_filename)))

Loading…
Cancel
Save