Menu

#1 Platform-independent temporary directory lookup

open
nobody
None
5
2003-10-22
2003-10-22
No

Hi,

I was trying to use the version 1.3.2 on Windows 2000
but the initial import of object always failed with an
OS error saying that "/tmp/RevisionManager-myproject"
was a bad path. Having a look at your source code I
spotted those two lines :

676 #XXX not portable
677 import_dir = "/tmp/RevisionManager-" + module.filename

A quick fix could be :

At line 22, insert "import tempfile"
Change line 677 to :
import_dir =
tempfile.gettempdir()+tempfile.os.sep+"RevisionManager-"
+ module.filename

This should be more portable.

Cheers for your work !

Nicolas

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.