Changes between Initial Version and Version 1 of Ticket #12757, comment 6
- Timestamp:
- Apr 5, 2017, 11:21:26 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12757, comment 6
initial v1 3 3 {{{#!diff 4 4 diff --git a/trac/util/autoreload.py b/trac/util/autoreload.py 5 index c74441058.. cce4903f31006445 index c74441058..3e83fbff5 100644 6 6 --- a/trac/util/autoreload.py 7 7 +++ b/trac/util/autoreload.py 8 @@ -62,7 +62,1 4@@ def _reloader_thread(modification_callback, loop_callback):8 @@ -62,7 +62,15 @@ def _reloader_thread(modification_callback, loop_callback): 9 9 10 10 def _restart_with_reloader(): … … 14 14 + args = sys.argv if os.access(sys.argv[0], os.X_OK) \ 15 15 + else [sys.executable] + sys.argv 16 + elif os.name == 'nt' and os.access(sys.argv[0] + '.exe', os.X_OK): 16 + elif sys.platform == 'win32' and \ 17 + os.access(sys.argv[0] + '.exe', os.X_OK): 17 18 + args = [sys.argv[0] + '.exe'] + sys.argv[1:] 18 19 + else: … … 22 23 args = ['"%s"' % arg for arg in args] 23 24 new_environ = os.environ.copy() 24 @@ -70,8 +7 7,7 @@ def _restart_with_reloader():25 @@ -70,8 +78,7 @@ def _restart_with_reloader(): 25 26 26 27 # This call reinvokes ourself and goes into the other branch of main as