the checks in the loop use str type for compare but line is type byte object. a convert is needed
class AVProbeProcess(BaseSubProcess):
"""
"""
if os.name == 'nt':
bin_name = 'avprobe.exe'
else:
bin_name = 'avprobe'
def info(self, filepath):
cmd = [self.binary, filepath]
result = {}
lines = self._run_command(cmd, or_error=True)
for line in lines.splitlines():
if ':' not in line:
continue
name, data = line.split(':', 1)
data = data.strip()
if not data:
continue
name = name.strip().lower()
if ' ' in name:
continue
result[name] = data
return result
the checks in the loop use str type for compare but line is type byte object. a convert is needed
class AVProbeProcess(BaseSubProcess): """ """ if os.name == 'nt': bin_name = 'avprobe.exe' else: bin_name = 'avprobe'