Ejemplo n.º 1
0
def failedToSend(reason):
    al = mtk.Ttk("Bug Send Error Win")
    al.geometry('200x200')
    al.title("Error")
    mtk.Label(al, text=reason).pack()
    mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
    al.mainloop()
Ejemplo n.º 2
0
def sendReport(report, win):
    win.destroy()
    win.quit()

    r = requests.post('https://pyeditbugserver.herokuapp.com/bug-report',
                      json=report.toJson())
    if (r.status_code != 200):
        al = mtk.Ttk("Bug Send Error Win")
        al.title("Error")
        mtk.Label(al, text=r.reason).pack()
        mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
        al.mainloop()
    else:
        al = mtk.Ttk("Bug Report Successfully Sent")
        al.title("Success!")
        mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
        al.mainloop()
Ejemplo n.º 3
0
def sendReport(report, win):
    win.destroy()
    win.quit()

    if os.environ['PY_EDIT_DEBUG']:
        r = requests.post('http://localhost:8099/bug-report', json=report.toJson());
    else:
        r = requests.post('https://pyeditbugserver.herokuapp.com/bug-report', json=report.toJson())
    if (r.status_code != 200):
        al = mtk.Ttk("Bug Send Error Win")
        al.geometry('200x200')
        al.title("Error")
        mtk.Label(al,
                  text=r.reason).pack()
        mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
        al.mainloop()
    else:
        al = mtk.Ttk("Bug Report Successfully Sent")
        al.geometry('200x200')
        al.title("Success!")
        mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
        al.mainloop()