Browse Source

Use googleapiclient.error

Arnau Sanchez 9 years ago
parent
commit
46bbd65b5a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      youtube_upload/main.py

+ 2 - 3
youtube_upload/main.py

@@ -21,7 +21,6 @@ import optparse
 import collections
 import collections
 import webbrowser
 import webbrowser
 
 
-import apiclient.errors
 import googleapiclient.errors
 import googleapiclient.errors
 import oauth2client
 import oauth2client
 
 
@@ -229,12 +228,12 @@ def main(arguments):
 
 
     #Additional options
     #Additional options
     parser.add_option('', '--open-link', dest='open_link', action='store_true',
     parser.add_option('', '--open-link', dest='open_link', action='store_true',
-        help='Opens a url in a web browser to display uploaded videos')
+        help='Opens a url in a web browser to display the uploaded video')
 
 
     options, args = parser.parse_args(arguments)
     options, args = parser.parse_args(arguments)
     try:
     try:
         run_main(parser, options, args)
         run_main(parser, options, args)
-    except (apiclient.errors.HttpError, googleapiclient.errors.HttpError) as error:
+    except googleapiclient.errors.HttpError as error:
         raise RequestError("Server response: {0}".format(error.content.strip()))
         raise RequestError("Server response: {0}".format(error.content.strip()))
 
 
 def run():
 def run():