Don't deal with invalid unicode

master
Jason A. Donenfeld 2015-01-27 14:39:44 +01:00
parent 8956a6c9a5
commit 148b88951d
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ class TreeWalker:
except KeyboardInterrupt:
raise
except:
pass
next_level()
message("unicode error", entry.decode(sys.getfilesystemencoding(), "replace"))
back_level()
continue
entry = os.path.join(path, entry)
if os.path.isdir(entry):
album.add_album(self.walk(entry))