-decoding exec_command from UTF-8 multiple times (bad)
This commit is contained in:
parent
0525f182ef
commit
4f5b9a0c91
1 changed files with 1 additions and 9 deletions
|
@ -265,16 +265,8 @@ class MediaMonitorCommon:
|
|||
def scan_dir_for_new_files(self, dir):
|
||||
command = 'find "%s" -type f -iname "*.ogg" -o -iname "*.mp3" -readable' % dir.replace('"', '\\"')
|
||||
self.logger.debug(command)
|
||||
stdout = self.exec_command(command).decode("UTF-8")
|
||||
stdout = self.exec_command(command)
|
||||
|
||||
try:
|
||||
"""
|
||||
File name charset encoding is UTF-8.
|
||||
"""
|
||||
stdout = stdout.decode("UTF-8")
|
||||
except Exception, e:
|
||||
self.logger.error("Could not decode %s using UTF-8" % stdout)
|
||||
|
||||
return stdout.splitlines()
|
||||
|
||||
def touch_index_file(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue