Added and updatet features
This commit is contained in:
parent
8ab6826aaf
commit
09464dd07d
2 changed files with 19 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
from DebugInterface import DebugInterface
|
||||
from Assets import weathericons
|
||||
from datetime import datetime
|
||||
import traceback
|
||||
|
||||
class DebugConsole (DebugInterface):
|
||||
"""Defines concrete console export of debug objects"""
|
||||
|
@ -10,6 +12,7 @@ class DebugConsole (DebugInterface):
|
|||
print('End datetime: ' + str(event.end_datetime))
|
||||
print('Duration: ' + str(event.duration))
|
||||
print('All day: ' + str(event.allday))
|
||||
print('Multi-day: ' + str(event.multiday))
|
||||
print('RRULE: ' + str(event.rrule))
|
||||
print('Title: ' + str(event.title))
|
||||
print('Description: ' + str(event.description))
|
||||
|
@ -45,4 +48,16 @@ class DebugConsole (DebugInterface):
|
|||
def print_line (self, content):
|
||||
if content is None:
|
||||
return
|
||||
print(str(content))
|
||||
print(str(content))
|
||||
|
||||
def print_err (self, exception, msg=""):
|
||||
if exception is None:
|
||||
return
|
||||
|
||||
content = "[ERR: "
|
||||
content += datetime.now().strftime("")
|
||||
content += "]\n" + str(exception)
|
||||
content += "\n" + str(msg) + "\n"
|
||||
traceback.print_exc()
|
||||
|
||||
self.print_line(str(content))
|
|
@ -7,4 +7,7 @@ class DebugInterface (object):
|
|||
raise NotImplementedError("Functions needs to be implemented")
|
||||
|
||||
def print_line (self, content):
|
||||
raise NotImplementedError("Functions needs to be implemented")
|
||||
|
||||
def print_err (self, exception, msg=""):
|
||||
raise NotImplementedError("Functions needs to be implemented")
|
Loading…
Reference in a new issue