def main():
app = None
try:
from libs.loadplugin import load_plugin # ???????? ????????
from program import Program # ???????? ????? ?????????
# ?????? ??????????.
app = Program()
load_plugin(app)
app.run()
except Exception:
text_error = traceback.format_exc()
open('{}/error.log'.format(directory), 'w').write(text_error)
print(text_error)
if app: # ??????? ????? ?????????? ?? ???? ????????
try:
app.screen.clear_widgets()
except AttributeError:
pass
class Error(App):
'''??????? ????? ? ??????? ??????.'''
def callback_report(self, *args):
'''??????? ???????? ???-???????'''
try:
txt = six.moves.urllib.parse.quote(
self.win_report.txt_traceback.text.encode('utf-8'))
url = 'https://github.com/HeaTTheatR/Conversations' \
'/issues/new?body=' + txt
webbrowser.open(url)
except Exception:
sys.exit(1)
def build(self):
self.win_report = BugReporter(
callback_report=self.callback_report,
txt_report=text_error,
icon_background='data/images/logo.png'
)
return self.win_report
Error().run()
评论列表
文章目录