Skip to content

Commit

Permalink
Make demo.py Python-3-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz committed May 4, 2016
1 parent ec3b541 commit e89f25e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ def process(fname):
if len(sys.argv) == 1:
print("Usage: {} <media_file>".format(sys.argv[0]))
sys.exit(0)
# else
process(sys.argv[1])
if sys.version_info.major < 3:
process(sys.argv[1].decode(sys.getfilesystemencoding()))
else:
process(sys.argv[1])

0 comments on commit e89f25e

Please sign in to comment.