Edgewall Software

Changes between Initial Version and Version 1 of Ticket #12757, comment 6


Ignore:
Timestamp:
Apr 5, 2017, 11:21:26 AM (7 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12757, comment 6

    initial v1  
    33{{{#!diff
    44diff --git a/trac/util/autoreload.py b/trac/util/autoreload.py
    5 index c74441058..cce4903f3 100644
     5index c74441058..3e83fbff5 100644
    66--- a/trac/util/autoreload.py
    77+++ b/trac/util/autoreload.py
    8 @@ -62,7 +62,14 @@ def _reloader_thread(modification_callback, loop_callback):
     8@@ -62,7 +62,15 @@ def _reloader_thread(modification_callback, loop_callback):
    99
    1010 def _restart_with_reloader():
     
    1414+            args = sys.argv if os.access(sys.argv[0], os.X_OK) \
    1515+                   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):
    1718+            args = [sys.argv[0] + '.exe'] + sys.argv[1:]
    1819+        else:
     
    2223             args = ['"%s"' % arg for arg in args]
    2324         new_environ = os.environ.copy()
    24 @@ -70,8 +77,7 @@ def _restart_with_reloader():
     25@@ -70,8 +78,7 @@ def _restart_with_reloader():
    2526
    2627         # This call reinvokes ourself and goes into the other branch of main as