Edgewall Software
Modify

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 Unknown Trac environment type 'Trac Environment Version 1 for CRLF line-ending.

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 Ryan J Ollos, 4 years ago

Milestone: 1.4.3
Owner: set to Ryan J Ollos
Status: newassigned

Good find. Looks like rstrip with no arguments would remove all whitespace.

comment:2 by Ryan J Ollos, 4 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Regression in r16782 (#13061).

Fix committed to 1.2-stable in r17480, merged in [17481:17482].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.