mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2026-12-02 03:45:20 +03:00
Fixed exception on copy to clipboard when opening last route
This commit is contained in:
1 parent
a14d00312a
commit
2c5a4b11d5
3 files changed
+11
-4
No files matched your search
@@ -5,3 +5,7 @@
|
||||
*.pyo
|
||||
*.pyc
|
||||
.vscode/settings.json
|
||||
|
||||
.vscode/
|
||||
|
||||
offset
|
||||
@@ -274,8 +274,11 @@ class SpanshRouter():
|
||||
|
||||
self.next_stop = self.route[self.offset][0]
|
||||
self.copy_waypoint()
|
||||
except:
|
||||
self.update_gui()
|
||||
|
||||
except IOError:
|
||||
print("No previously saved route.")
|
||||
except:
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
sys.stderr.write(''.join('!! ' + line for line in lines))
|
||||
|
||||
@@ -7,19 +7,18 @@ else:
|
||||
from SpanshRouter.SpanshRouter import SpanshRouter
|
||||
import tkinter.messagebox as confirmDialog
|
||||
|
||||
spansh_router = None
|
||||
|
||||
def plugin_start3(plugin_dir):
|
||||
global spansh_router
|
||||
spansh_router = SpanshRouter(plugin_dir)
|
||||
spansh_router.check_for_update()
|
||||
spansh_router.open_last_route()
|
||||
return 'spansh_router'
|
||||
|
||||
def plugin_start(plugin_dir):
|
||||
# Check for newer versions
|
||||
global spansh_router
|
||||
spansh_router = SpanshRouter(plugin_dir)
|
||||
spansh_router.check_for_update()
|
||||
spansh_router.open_last_route()
|
||||
return 'spansh_router'
|
||||
|
||||
def plugin_stop():
|
||||
@@ -54,4 +53,5 @@ def ask_for_update():
|
||||
def plugin_app(parent):
|
||||
global spansh_router
|
||||
spansh_router.init_gui(parent)
|
||||
spansh_router.open_last_route()
|
||||
parent.master.after_idle(ask_for_update)
|
||||
Reference in new issue
Block a user