Ticket #329 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

trying to delete temporary directory before closing config file in checkconfig

Reported by: vuswati Owned by:
Priority: critical Milestone: 0.7.10
Version: 0.7.8 Keywords:
Cc:

Description (last modified by dustin) (diff)

            os.chdir(tempdir)
            # Add the temp directory to the library path so local modules work
            sys.path.append(tempdir)
            configFile = open(configFileName, "r")
            self.loadConfig(configFile)
        except:
            print "in exception"
            os.chdir(dir)
            rmtree(tempdir)
            raise

missing statement after loadconfig is to close the config file

           configFile.close();
            sys.path.remove(tempdir)

Because of which running checkconfig informs an error "file in directory used by other process"

Change History

comment:1 Changed 4 years ago by dustin

  • Description modified (diff)

comment:2 Changed 4 years ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from undecided to 0.7.10
commit be3c8d5327796047d31204e645fe9ce3996e9212
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date:   Tue Feb 10 18:43:08 2009 -0500

    (refs #329) close the test config file before removing the temporary directory
Note: See TracTickets for help on using tickets.