Commits

spirit  committed ced0864

Python 3.3 os.rename() issue

  • Participants
  • Parent commits 6b76196

Comments (0)

Files changed (1)

File generate_scenechange_file_cli.py

                    encoded_sc_filename.decode(FILE_SYSTEM_ENCODING)]:
             g = glob.glob(fn)
             if g:
-                os.rename(g[0], sc_filename)
+                old_fn = g[0]
+                if not isinstance(old_fn, str):
+                    old_fn = str(old_fn, FILE_SYSTEM_ENCODING)
+                os.rename(old_fn, sc_filename)
                 return True
     finally:
         os.chdir(cwd)