Opened 4 years ago
Closed 4 years ago
#13320 closed defect (fixed)
Environment Type Parsing Fails Due to Carriage Return
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.3 |
Component: | general | Version: | 1.4.2 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed regression leading to |
||
API Changes: | |||
Internal Changes: |
Description
Attempting to upgrade an old Trac 0.12 installation from Apache on Windows to Apache on WSL (Ubuntu 20.04).
The environment version check did not strip the carriage return, therefore generating the error
Unknown Trac environment type 'Trac Environment Version 1
Adding the strip for the carriage return in env.py fixed the problem. (There may be a more elegant way, but this worked.)
def verify(self): """Verify that the provided path points to a valid Trac environment directory.""" try: with open(os.path.join(self.path, 'VERSION')) as f: tag = f.readline().rstrip('\n').rstrip('\r')
Attachments (0)
Change History (2)
comment:1 by , 4 years ago
Milestone: | → 1.4.3 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 4 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Regression in r16782 (#13061).
Fix committed to 1.2-stable in r17480, merged in [17481:17482].
Good find. Looks like
rstrip
with no arguments would remove all whitespace.