Check for secrets file
This commit is contained in:
1 parent
0e9ba7048d
commit
739338e2d8
1 file changed
+3
@@ -40,6 +40,9 @@ def get_yt_creds():
|
||||
if creds and creds.expired and creds.refresh_token:
|
||||
creds.refresh(Request())
|
||||
else:
|
||||
if not os.path.exists(client_secrets_file):
|
||||
print(f'Client secrets file {client_secrets_file} not found')
|
||||
sys.exit(1)
|
||||
flow = InstalledAppFlow.from_client_secrets_file(
|
||||
client_secrets_file, scopes
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user