Modify

Opened 3 years ago

Closed 3 years ago

#7880 closed defect (fixed)

"ioerror: invalid mode: Ur" in htfile.py

Reported by: dmgloss@… Owned by: hasienda
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: python syntax
Cc: Trac Release: 0.12

Description

Python 2.4 complains about invalid mode Ur in htfile.py, line 209

    def _get_users(self, filename):
        f = open(filename, 'Ur')
        for line in f:
            user = line.split(':', 1)[0]

Solved it by simply changing mode to 'rU' everywhere in that file.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by hasienda

  • Keywords python syntax added
  • Status changed from new to assigned

Sure, my fault. Python docs confirms your findings.

I've tested extensively before, so his has slipped through, because at least Python2.5 tolerates the reverse order and works with 'Ur' just the same way as 'rU'.

So many thanks for the report. Will fix this immediately.

comment:2 Changed 3 years ago by hasienda

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [9344]) AccountManagerPlugin: Correct reversed mode argument in read mode, closes #7880.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from hasienda. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.