From 01dc4fca14c99ff70471c0b91cd126763b4b56d9 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sun, 18 Nov 2018 17:02:33 -0600 Subject: [PATCH] Simply changed if pass to not equal --- gapi/drive_api.py | 4 +--- test_drive.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gapi/drive_api.py b/gapi/drive_api.py index 68e44d4..ecc7331 100644 --- a/gapi/drive_api.py +++ b/gapi/drive_api.py @@ -143,9 +143,7 @@ class drive_api(API): if end == '/': return self.root for sub in path: - if sub == '/': - pass - else: + if sub != '/': try: if not parent.folders: parent.refresh() diff --git a/test_drive.py b/test_drive.py index 9cab088..0dcbf1d 100644 --- a/test_drive.py +++ b/test_drive.py @@ -2,7 +2,7 @@ import os import gapi from gapi.drive_api import drive_api,APPLICATION_NAME my_api = drive_api(APPLICATION_NAME,r'test\drive\client_secret.json',r'test\drive') -# t1 = my_api.get_file_by_path('/Python/Lib/site-packages',False) +t1 = my_api.get_file_by_path('/Python/Lib/site-packages',False) # t1.refresh() -t2 = my_api.mkdirs('/test/t1/this/is/a/path/why/isnt/this/working') -t3 = my_api.upload(os.getcwd(),'/test/t3') \ No newline at end of file +# t2 = my_api.mkdirs('/test/t1/this/is/a/path/why/isnt/this/working') +# t3 = my_api.upload(os.getcwd(),'/test/t3') \ No newline at end of file