Browse Source

fix unicode error

Your Name 9 years ago
parent
commit
895831984f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      youtube_upload/lib.py

+ 1 - 1
youtube_upload/lib.py

@@ -32,7 +32,7 @@ def debug(obj, fd=sys.stderr):
     except NameError:
     except NameError:
         unicode = bytes
         unicode = bytes
     string = str(obj.encode(get_encoding(fd), "backslashreplace")
     string = str(obj.encode(get_encoding(fd), "backslashreplace")
-                 if isinstance(obj, unicode) else obj)
+                 if not isinstance(obj, unicode) else obj)
     fd.write(string + "\n")
     fd.write(string + "\n")
 
 
 def catch_exceptions(exit_codes, fun, *args, **kwargs):
 def catch_exceptions(exit_codes, fun, *args, **kwargs):