mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-22 19:23:21 +00:00
Added error supressing / encoding to terminal output
This commit is contained in:
@@ -684,7 +684,7 @@ class PseudoChannel():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
print("Cannot find Movie, {} in the local db".format(entry[3]))
|
print str("Cannot find Movie, {} in the local db".format(entry[3])).encode('UTF-8')
|
||||||
|
|
||||||
elif section == "Music":
|
elif section == "Music":
|
||||||
|
|
||||||
@@ -711,7 +711,7 @@ class PseudoChannel():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
print("Cannot find Music, {} in the local db".format(entry[3]))
|
print str("Cannot find Music, {} in the local db".format(entry[3])).encode('UTF-8')
|
||||||
|
|
||||||
elif section == "Video":
|
elif section == "Video":
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ class PseudoChannel():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
print("Cannot find Video, {} in the local db".format(entry[3]))
|
print str("Cannot find Video, {} in the local db".format(entry[3])).encode('UTF-8')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
@@ -903,7 +903,7 @@ class PseudoChannel():
|
|||||||
|
|
||||||
for i , entry in enumerate(daily_schedule):
|
for i , entry in enumerate(daily_schedule):
|
||||||
|
|
||||||
print "+++++", str(i + 1)+".", entry[8], entry[11], entry[6], " - ", entry[3]
|
print str("+++++ {} {} {} {} {} {}".format(str(i + 1)+".", entry[8], entry[11], entry[6], " - ", entry[3])).encode(sys.stdout.encoding, errors='replace')
|
||||||
|
|
||||||
def exit_app(self):
|
def exit_app(self):
|
||||||
|
|
||||||
@@ -1069,7 +1069,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
def job_that_executes_once(item, schedulelist):
|
def job_that_executes_once(item, schedulelist):
|
||||||
|
|
||||||
print "##### Readying media: '{}'".format(item[3])
|
print str("##### Readying media: '{}'".format(item[3])).encode('UTF-8')
|
||||||
|
|
||||||
next_start_time = datetime.datetime.strptime(item[8], "%I:%M:%S %p")
|
next_start_time = datetime.datetime.strptime(item[8], "%I:%M:%S %p")
|
||||||
|
|
||||||
|
|||||||
@@ -583,10 +583,10 @@ class PseudoDailyScheduleController():
|
|||||||
|
|
||||||
def play(self, row, datalist):
|
def play(self, row, datalist):
|
||||||
|
|
||||||
print "##### Starting Media: '{}'".format(row[3])
|
print str("##### Starting Media: '{}'".format(row[3])).encode('UTF-8')
|
||||||
|
|
||||||
if self.DEBUG:
|
if self.DEBUG:
|
||||||
print(row)
|
print str(row).encode('UTF-8')
|
||||||
|
|
||||||
timeB = datetime.strptime(row[8], '%I:%M:%S %p')
|
timeB = datetime.strptime(row[8], '%I:%M:%S %p')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user