Skip to content

Commit 06a17c3

Browse files
author
Ethan Hansen
committed
now results are saved w/ date
Signed-off-by: Ethan Hansen <1ethanhansen@gmail.com>
1 parent 70151da commit 06a17c3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ results.csv
44
Applications/
55
*.swp
66
generated_input.yaml
7+
archives/
78

89
# Byte-compiled / optimized / DLL files
910
__pycache__/

get-image-info.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,14 @@ def runit(app_list, hub_list):
194194
"ibmcorp/db2_developer_c",
195195
"ibmcorp/db2_developer_c"
196196
]
197+
198+
#set up file name, make directory if it doesn't exist
199+
date = datetime.today().strftime("%d-%b-%Y") #16-Jul-2019
200+
results_file_loc = "archives/results-{}.csv".format(date)
201+
os.makedirs("archives", exist_ok=True)
197202

198-
f = open("results.csv", "a+")
203+
#re-writes files on the same day, leaves old files
204+
f = open(results_file_loc, "w+")
199205
f.write("Product,App,amd64,ppc64le,s390x,Images,Container,amd64,ppc64le,s390x,Tag Exists?\n")
200206

201207
#used for the progress bar

0 commit comments

Comments
 (0)