def main():
app = None
try:
from program import Program # ???????? ????? ?????????
# ?????? ??????????.
app = Program()
app.run()
except Exception as exc:
print(traceback.format_exc())
traceback.print_exc(file=open("{}/error.log".format(
os.path.split(os.path.abspath(sys.argv[0]))[0]), "w"))
if app: # ??????? ????? ?????????? ?? ???? ????????
app.start_screen.clear_widgets()
class Error(App):
"""??????? ????? ? ??????? ??????."""
def callback_report(self, *args):
"""??????? ???????? ???-???????"""
try:
import webbrowser
import six.moves.urllib
txt = six.moves.urllib.parse.quote(
self.win_report.txt_traceback.text.encode(
"utf-8"))
url = "https://github.com/HeaTTheatR/KivyCleanMasterDemo" \
"/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=str(exc),
icon_background="Data/Images/logo.png")
return self.win_report
Error().run()
评论列表
文章目录