fix meta pipe crashes caused by unknown unicode characters (looks ugly now at times, but at least works continuously)

This commit is contained in:
Jakob Ketterl 2019-05-18 22:27:19 +02:00
parent edadc383ff
commit bb6b00a998

View File

@ -450,7 +450,8 @@ class dsp(object):
return float(raw.rstrip("\n")) return float(raw.rstrip("\n"))
self.output.add_output("smeter", read_smeter) self.output.add_output("smeter", read_smeter)
if self.meta_pipe != None: if self.meta_pipe != None:
self.meta_pipe_file=open(self.meta_pipe,"r") # TODO make digiham output unicode and then change this here
self.meta_pipe_file=open(self.meta_pipe, "r", encoding="cp437")
def read_meta(): def read_meta():
raw = self.meta_pipe_file.readline() raw = self.meta_pipe_file.readline()
if len(raw) == 0: if len(raw) == 0: