From c9367e965e5bf9436617d1a053c9f16f87cc0a92 Mon Sep 17 00:00:00 2001 From: richiverse Date: Wed, 20 Mar 2019 09:31:53 -0400 Subject: [PATCH] fix metadata route --- pandas_ext/gdrive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas_ext/gdrive.py b/pandas_ext/gdrive.py index d8db42d..0150ff0 100644 --- a/pandas_ext/gdrive.py +++ b/pandas_ext/gdrive.py @@ -161,12 +161,12 @@ def gdrive_metadata(url: str, fetch_all=False) -> object: try: metadata['folder_id'] = ( - None if 'parents' not in metadata + None if not metadata['parents'] else metadata['parents'][0]['id'] ) except IndexError: raise('The file must reside in a folder that is shared with ' - 'pydrive@namely.com.') + '@.com.') if 'lastModifyingUser' in metadata: metadata['last_mod_by_email'] = (