Changeset 3446

Show
Ignore:
Timestamp:
11/13/08 08:44:14 (16 years ago)
Author:
jerome
Message:

Removed hardcoded temporary directory names. They were only used in the
case the directory pointed to by the "directory" directive was not
writeable, but it's better anyway.

--Cette ligne, et les suivantes ci-dessous, seront ignorées--

M bin/cupspykota

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r3413 r3446  
    138138        if not directory : 
    139139            directory = "./" 
    140         tmpdir = tempfile.gettempdir() 
    141         lockfilename = os.path.join(tmpdir, "%s..LCK" % myname) 
     140        lockfilename = os.path.join(tempfile.gettempdir(), "%s..LCK" % myname) 
    142141        if os.path.exists(lockfilename) : 
    143142            lockfile = open(lockfilename, "r") 
     
    231230        self.PrinterName = os.environ.get("PRINTER", "") 
    232231        directories = [ self.config.getPrinterDirectory(self.PrinterName), 
    233                         "/tmp", 
    234                         "/var/tmp" ] 
     232                        tempfile.gettempdir() ] 
    235233        self.Directory = None 
    236234        for direc in directories :