Modify ↓
Opened 6 years ago
Closed 6 years ago
#13063 closed defect (fixed)
TracStandalone should check for existence of environment path(s)
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.4 |
Component: | web frontend/tracd | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description
Reported in gmessage:trac-users:vbxMYlLO1kA/S1yC0-zmCgAJ.
Attachments (0)
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Release Notes: | modified (diff) |
---|
comment:3 by , 6 years ago
Testing the branch for 1.2-stable, value of --pidfile
option is checked but error is not raised with non-existent file.
$ PYTHONPATH=. python -m trac.web.standalone --pidfile=/x.pid --port=3000 -e / Server starting in PID 2988. Serving on 0.0.0.0:3000 view at http://127.0.0.1:3000/ Using HTTP/1.1 protocol version
parser.has_option('pidfile')
should beparser.has_option('--pidfile')
- I don't think the pid file should be checked. The file normally is not existent before running tracd. It would be created if not existent.
- if parser.has_option('pidfile') and options.pidfile: - options.pidfile = to_abspath(options.pidfile) + if parser.has_option('--pidfile') and options.pidfile: + options.pidfile = os.path.abspath(options.pidfile)
Another thing, I consider we should use %s
for path parameter rather than %r
, especially for Windows ('C:\\path\\to\\tracenv'
is printed instead of 'C:\path\to\tracenv'
).
- raise parser.error("Path does not exist: %r" % path) + raise parser.error("Path does not exist: '%s'" % path)
Note:
See TracTickets
for help on using tickets.
Proposed changes for trunk in [d8ff3e3d8/rjollos.git]. I'll prepare changes for 1.2-stable.