From 5f91901ae3788bcd2d156662cc022257fc6ed7c7 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Tue, 20 Sep 2016 09:53:08 +0100 Subject: [PATCH 1/2] Newlines removed properly for compatibility Newlines were removed by stripping '\n' characters, they are now removed properly using .rsplit() for compatibility with other operating systems. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 61b0543..dded17e 100644 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ for i in range(0, len(borg_output)): if borg_output[i].startswith(key): attributes[key] = borg_output[i] \ .strip(key) \ - .strip("\n") + .rstrip() output = open("borg.txt", "w") From 2e6162aaf749d8eb9006cf836fc09d7c511d4eb7 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Tue, 20 Sep 2016 09:57:55 +0100 Subject: [PATCH 2/2] Add .txt files to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 72364f9..d293962 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ __pycache__/ # C extensions *.so +# Generic file extensions +*.txt + # Distribution / packaging .Python env/