Modify

Opened 7 years ago

Closed 7 years ago

#7880 closed defect (fixed)

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

Reported by: dmgloss@… Owned by: Steffen Hoffmann
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 7 years ago by Steffen Hoffmann

Keywords: python syntax added
Status: newassigned

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 7 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.