Ticket #613 (closed: deferred)

Opened 10 months ago

Last modified 10 months ago

"Could not write status file" on Windows

Reported by: zencoder Owned by: ralf
Priority: none Milestone:
Component: mwlib Severity: major
Keywords: Cc:

Description

Error message:

2009-05-19T14:57:33 mwlib.status.ERROR >> Could not write status file 'd:/var/cache/mwlib/d\\dc\\dcb8144c2bd9a2c1\\status.rl': [Error 183] Cannot create a file when that file already exists

Applies to:

mwlib-0.11.3.dev-py2.5-win32

Fix:

D:\Python25\Lib\site-packages\mwlib-0.11.3.dev-py2.5-win32.egg\mwlib\status.py

On line 81, add this before the rename:

--> if os.path.exists(self.filename):

--> os.unlink(self.filename)

os.rename(self.filename + '.tmp', self.filename)

Interestingly, this also fixed a Content-Type problem (PDF was returned as plain text).

Change History

Changed 10 months ago by ralf

windows sucks so much. why not use cygwin? vmware? andlinux?

Changed 10 months ago by jojo

The above "Fix" would introduce a race-condition. That's the only reason for the os.rename() call. (Otherwise one could write directly to a file named self.filename.)

Changed 10 months ago by ralf

  • status changed from new to closed
  • resolution set to deferred

unless we decide to support windows, this will most probably not be fixed. closing as deferred.

Note: See TracTickets for help on using tickets.