Issue #91: fix - make the date and time windows filesystem-compatible.
authorSteven Black <redacted>
Mon, 22 Feb 2016 01:55:38 +0000 (20:55 -0500)
committerSteven Black <redacted>
Mon, 22 Feb 2016 01:55:38 +0000 (20:55 -0500)
updateHostsFile.py

index d397f67d6fe65a309abe44a54da9b7008fec653e..621bd1a9cebe5c715e31e6500e4bf6f9bb57d80f 100644 (file)
@@ -370,7 +370,7 @@ def moveHostsFileIntoPlace(finalFile):
 def removeOldHostsFile():               # hotfix since merging with an already existing hosts file leads to artefacts and duplicates
     oldFilePath = os.path.join(BASEDIR_PATH, 'hosts')
     open(oldFilePath, 'a').close()        # create if already removed, so remove wont raise an error
-    backupFilePath = os.path.join(BASEDIR_PATH, 'hosts-{0}'.format(time.strftime("%c")))
+    backupFilePath = os.path.join(BASEDIR_PATH, 'hosts-{0}'.format(time.strftime("%Y-%m-%d-%H-%M-%S")))
     shutil.copy(oldFilePath, backupFilePath) # make a backup copy, marking the date in which the list was updated
     os.remove(oldFilePath)
     open(oldFilePath, 'a').close()        # create new empty hostsfile
git clone https://git.99rst.org/PROJECT