#1396 closed defect

writing an incident flogfile (via foolscap 0.6.0/1) tries to use characters not valid in a Windows filename (':') — at Version 4

Reported by: davidsarah Owned by: somebody
Priority: major Milestone: 1.10.0
Component: code Version: 1.8.2
Keywords: windows error incident logging foolscap regression Cc:
Launchpad Bug:

Description (last modified by davidsarah)

While reporting the incident in #1395 on a Windows platform, the following error occurred:

[Failure instance: Traceback: <type 'exceptions.IOError'>:
[Errno 22] invalid mode ('wb') or filename:
u'C:\\tahoeclient\\logs\\incidents\\incident-2011-05-05--18:33:34Z-w2qn32q.flog'

The problem (or at least one problem) is that ':' is not valid in a Windows filename. This MSDN article documents the Windows filename validity rules.

Presumably we don't have any test of writing an incident flogfile. This may mean that incident reporting has always been broken on Windows (unless the flogfile naming changed?) A change to flogfile naming in foolscap 0.6.0 apparently caused this bug.

Change History (4)

comment:1 Changed at 2011-05-06T16:02:41Z by davidsarah

  • Description modified (diff)

(linewrap description for readability)

comment:2 Changed at 2011-05-06T16:14:40Z by davidsarah

  • Keywords foolscap added

The problem is actually in foolscap, apparently due to the time format here in foolscap/logging/incident.py:

TIME_FORMAT = "%Y-%m-%d--%H:%M:%S"

which is used indirectly by incident_declared to create the filename. Will file a foolscap ticket.

comment:4 Changed at 2011-05-06T16:47:48Z by davidsarah

  • Description modified (diff)
  • Summary changed from writing an incident flogfile tries to use characters not valid in a Windows filename (':') to writing an incident flogfile (via foolscap 0.6.0/1) tries to use characters not valid in a Windows filename (':')
Note: See TracTickets for help on using tickets.