Skip to content

Commit 9245857

Browse files
author
Jakob Maier
committed
Merge branch 'new-client-script' into omicron_scripts
2 parents c0d43ab + a7a56c4 commit 9245857

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/client/get_project_vulnerabilites_as_csv.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
level=logging.DEBUG,
2626
format="[%(asctime)s] {%(module)s:%(lineno)d} %(levelname)s - %(message)s"
2727
)
28+
<<<<<<< HEAD
29+
=======
30+
def strip_newline(str):
31+
return str.replace('\r', '').replace('\n', '')
32+
>>>>>>> new-client-script
2833

2934
def main():
3035
program_name = os.path.basename(sys.argv[0])
@@ -67,8 +72,13 @@ def main():
6772

6873
status = remediation['remediationStatus']
6974
identifier = remediation['vulnerabilityName']
75+
<<<<<<< HEAD
7076
description = remediation['description'].replace('\r', '').replace('\n', '')
7177
comment = remediation.get('remediationComment', "").replace('\r', '').replace('\n', '')
78+
=======
79+
description = strip_newline(remediation['description'])
80+
comment = strip_newline(remediation.get('remediationComment', ""))
81+
>>>>>>> new-client-script
7282

7383
row = [identifier, status, comment, componentName, componentVersion, description]
7484
csv_writer.writerow(row)

0 commit comments

Comments
 (0)