Being even nicer to Windows.

This commit is contained in:
Jeremy Fincher 2003-10-05 21:21:07 +00:00
parent 0f350eefe5
commit 0c303de664

View File

@ -151,7 +151,8 @@ class PeriodicFileDownloader(object):
toFilename = os.path.join(conf.dataDir, filename) toFilename = os.path.join(conf.dataDir, filename)
if os.name == 'nt': if os.name == 'nt':
# Windows, grrr... # Windows, grrr...
os.remove(toFilename) if os.path.exists(toFilename):
os.remove(toFilename)
os.rename(newFilename, toFilename) os.rename(newFilename, toFilename)
else: else:
start = time.time() start = time.time()