Browse Source

Remove usr/share client_secrets reference

Arnau Sanchez 6 years ago
parent
commit
4e7acb7116
1 changed files with 2 additions and 6 deletions
  1. 2 6
      youtube_upload/main.py

+ 2 - 6
youtube_upload/main.py

@@ -145,16 +145,12 @@ def upload_youtube_video(youtube, options, video_path, total_videos, index):
 def get_youtube_handler(options):
     """Return the API Youtube object."""
     home = os.path.expanduser("~")
-    default_client_secrets = lib.get_first_existing_filename(
-        [sys.prefix, os.path.join(sys.prefix, "local")],
-        "share/youtube_upload/client_secrets.json")  
     default_credentials = os.path.join(home, ".youtube-upload-credentials.json")
-    client_secrets = options.client_secrets or default_client_secrets or \
-        os.path.join(home, ".client_secrets.json")
+    client_secrets = options.client_secrets or os.path.join(home, ".client_secrets.json")
     credentials = options.credentials_file or default_credentials
     debug("Using client secrets: {0}".format(client_secrets))
     debug("Using credentials file: {0}".format(credentials))
-    get_code_callback = (auth.browser.get_code 
+    get_code_callback = (auth.browser.get_code
         if options.auth_browser else auth.console.get_code)
     return auth.get_resource(client_secrets, credentials,
         get_code_callback=get_code_callback)