Opened 6 years ago

Closed 6 years ago

#7880 closed defect (fixed)

"ioerror: invalid mode: Ur" in

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


Python 2.4 complains about invalid mode Ur in, 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 6 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 6 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

as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.