Force system encoding to be UTF-8.
This commit is contained in:
parent
598fef93fd
commit
0cf87e26de
@ -1,18 +1,21 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from TreeWalker import TreeWalker
|
from TreeWalker import TreeWalker
|
||||||
from sys import argv, exit
|
|
||||||
from CachePath import message
|
from CachePath import message
|
||||||
|
import sys
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(argv) != 3:
|
reload(sys)
|
||||||
print "usage: %s ALBUM_PATH CACHE_PATH" % argv[0]
|
sys.setdefaultencoding("UTF-8")
|
||||||
|
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
print "usage: %s ALBUM_PATH CACHE_PATH" % sys.argv[0]
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
TreeWalker(argv[1], argv[2])
|
TreeWalker(sys.argv[1], sys.argv[2])
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
message("keyboard", "CTRL+C pressed, quitting.")
|
message("keyboard", "CTRL+C pressed, quitting.")
|
||||||
exit(-97)
|
sys.exit(-97)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
Loading…
Reference in New Issue
Block a user