~bdrung/apport/lp-1684600-gnu-linux

Viewing all changes in revision 3282.

  • Committer: Benjamin Drung
  • Date: 2020-08-21 15:15:59 UTC
  • Revision ID: bdrung@ubuntu.com-20200821151559-tx32fbe9io3h7mq1
Fix stripping GNU/Linux from DistroRelease

The DistroRelease contains GNU/Linux on Debian (example: "Debian
GNU/Linux 8"). The containing slash is very confusing when using the
DistroRelease as path.

name[1:-2] strips one leading characters and two trailing characters and
removes one character too much at the end. Thus the name.endswith check
fails to match 'GNU/Linux' and does nothing. If it was matching
GNU/Linux, it would set name to a list.

Fix the parsing of /etc/os-release by using shlex.

LP: #1684600

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: