Ticket #613 (closed: deferred)

Opened 16 months ago

Last modified 15 months ago

"Could not write status file" on Windows

Reported by: zencoder Owned by: ralf
Priority: none 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

comment:1 Changed 16 months ago by ralf

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

comment:2 Changed 16 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.)

comment:3 Changed 15 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.