Edgewall Software

Ticket #7049: no-auto-reload-deamonize.patch

File no-auto-reload-deamonize.patch, 1.2 KB (added by Remy Blank <remy.blank@…>, 4 months ago)

Patch against 0.11-stable [7363] disallowing --auto-reload with --deamonize

  • trac/web/standalone.py

    diff --git a/trac/web/standalone.py b/trac/web/standalone.py
    a b  
    188188        elif len(args) > 1: 
    189189            parser.error('the --single-env option cannot be used with ' 
    190190                         'more than one enviroment') 
     191    if options.daemonize and options.autoreload: 
     192        parser.error('the --auto-reload option cannot be used with ' 
     193                     '--daemonize') 
    191194 
    192195    if options.port is None: 
    193196        options.port = { 
     
    196199            'ajp': 8009, 
    197200        }[options.protocol] 
    198201    server_address = (options.hostname, options.port) 
    199  
    200     # autoreload doesn't work when daemonized and using relative paths 
    201     if options.daemonize and options.autoreload: 
    202         for path in args + [options.env_parent_dir, options.pidfile]: 
    203             if path and not os.path.isabs(path): 
    204                 parser.error('"%s" is not an absolute path.\n\n' 
    205                              'when using both --auto-reload and --daemonize ' 
    206                              'all path arguments must be absolute' 
    207                              % path) 
    208202 
    209203    # relative paths don't work when daemonized 
    210204    args = [os.path.abspath(a) for a in args]