stdevel / satprep

Python toolkit for automating system maintenance and generating CSV/PDF patch reports along with Spacewalk, Red Hat Satellite 5.x or SUSE Manager
GNU General Public License v3.0
14 stars 6 forks source link

Custom info keys are not escaped #49

Closed stdevel closed 8 years ago

stdevel commented 8 years ago

Custom info keys are not escaped, resulting in aborts sometimes. E.g. if a newline is part of a custom info key, an error is created:

...
Traceback (most recent call last):
  File "./satprep_snapshot.py", line 540, in <module>
    main(options)
  File "./satprep_snapshot.py", line 127, in main
    process_system(client, key, writer, system)
  File "./satprep_snapshot.py", line 151, in process_system
    process_errata(client, key, writer, system)
  File "./satprep_snapshot.py", line 358, in process_errata
    writer.writerow(valueSet)
_csv.Error: need to escape, but no escapechar set

Debugging is kinda hard and real a pain if you have hundreds of hosts..

stdevel commented 8 years ago

Fixed in commit 9e478d522f94d39fb002a2f031868735b51fe5ad