]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/cmdline.py
Merge pull request #160 from nicksloan/master
[z_archive/twitter.git] / twitter / cmdline.py
index f586e4ae8b1eecf554246bf307bb13344ffa1475..fd062f098640325f8c4260afce3f4ebc3169405c 100644 (file)
@@ -132,8 +132,9 @@ def parse_args(args, options):
                  'datestamp', 'no-ssl', 'force-ansi']
     short_opts = "e:p:f:h?rR:c:l:td"
     opts, extra_args = getopt(args, short_opts, long_opts)
-    extra_args = [arg.decode(locale.getpreferredencoding())
-                  for arg in extra_args]
+    if extra_args and hasattr(extra_args[0], 'decode'):
+        extra_args = [arg.decode(locale.getpreferredencoding())
+                      for arg in extra_args]
 
     for opt, arg in opts:
         if opt in ('-f', '--format'):