Add minor documentation

This commit is contained in:
George Lacey 2016-09-22 11:36:05 +01:00
parent f6a52ece4d
commit 5d299e7d82

View File

@ -4,6 +4,7 @@ from Database import *
raw_borg_output = stdin.readlines() raw_borg_output = stdin.readlines()
# attribute names of log based on borg output
attributes = {"Archive name: ": "", attributes = {"Archive name: ": "",
"Archive fingerprint: ": "", "Archive fingerprint: ": "",
"Time (start): ": "", "Time (start): ": "",
@ -11,7 +12,8 @@ attributes = {"Archive name: ": "",
"Number of files: ": ""} "Number of files: ": ""}
for i in range(0, len(raw_borg_output)): for i in range(0, len(raw_borg_output)):
# Look for lines matching attribute names
for key in attributes: for key in attributes:
if raw_borg_output[i].startswith(key): if raw_borg_output[i].startswith(key):
attributes[key] = raw_borg_output[i] \ attributes[key] = raw_borg_output[i] \