Move update to front
authorPhilipp Hagemeister <phihag@phihag.de>
Sat, 12 Jan 2013 12:45:39 +0000 (13:45 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 12 Jan 2013 12:45:39 +0000 (13:45 +0100)
youtube_dl/__init__.py

index d7ab0f0866006968b24f7e7c9318e982bf0b30b9..95add9eb1102d669983f6647adc6ffb9d7ad58d9 100644 (file)
@@ -278,6 +278,10 @@ def parseOpts():
 def _real_main():
     parser, opts, args = parseOpts()
 
+    # Update version
+    if opts.update_self:
+        update_self(fd.to_screen, opts.verbose, sys.argv[0])
+
     # Open appropriate CookieJar
     if opts.cookiefile is None:
         jar = compat_cookiejar.CookieJar()
@@ -455,10 +459,6 @@ def _real_main():
     if opts.extractaudio:
         fd.add_post_processor(FFmpegExtractAudioPP(preferredcodec=opts.audioformat, preferredquality=opts.audioquality, keepvideo=opts.keepvideo, nopostoverwrites=opts.nopostoverwrites))
 
-    # Update version
-    if opts.update_self:
-        update_self(fd.to_screen, opts.verbose, sys.argv[0])
-
     # Maybe do nothing
     if len(all_urls) < 1:
         if not opts.update_self: