diff options
author | 2020-05-08 20:46:35 -0700 | |
---|---|---|
committer | 2020-05-08 20:48:38 -0700 | |
commit | a7d3a01ae62b55d4e4f0ada9b8b5a9466565371d (patch) | |
tree | e8fba627c8d9ab33a39c2e4707d13bb4e8c6d2ad /app-portage/elogviewer/files | |
parent | net-firewall/iptables: Revbump, fix eselect bug (bug #721578) (diff) | |
download | gentoo-a7d3a01ae62b55d4e4f0ada9b8b5a9466565371d.tar.gz gentoo-a7d3a01ae62b55d4e4f0ada9b8b5a9466565371d.tar.bz2 gentoo-a7d3a01ae62b55d4e4f0ada9b8b5a9466565371d.zip |
app-portage/elogviewer: Revision bump 3.0, add patch
Add a patch to fix a HeaderState.parse segfault for a newer line format
Bug: https://bugs.gentoo.org/721522
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'app-portage/elogviewer/files')
-rw-r--r-- | app-portage/elogviewer/files/elogviewer-3.0-segfault.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app-portage/elogviewer/files/elogviewer-3.0-segfault.patch b/app-portage/elogviewer/files/elogviewer-3.0-segfault.patch new file mode 100644 index 000000000000..cc67a0d6f198 --- /dev/null +++ b/app-portage/elogviewer/files/elogviewer-3.0-segfault.patch @@ -0,0 +1,34 @@ +--- a/elogviewer.py 2020-05-08 20:23:04.419257166 -0700 ++++ b/elogviewer.py 2020-05-08 20:23:30.436359552 -0700 +@@ -255,15 +255,22 @@ + return "</h2>" + + def parse(self, line): +- eclass, stage = line.split(":") +- self.context.eclass = { +- "ERROR": EClass.Error, +- "WARN": EClass.Warning, +- "LOG": EClass.Log, +- "INFO": EClass.Info, +- "QA": EClass.QA, +- }[eclass] +- return "{}: {}".format(self.context.eclass.name, stage) ++ if not line: ++ return ++ parts = line.split(":") ++ if len(parts) == 2: ++ eclass, stage = parts[0:2] ++ self.context.eclass = { ++ "ERROR": EClass.Error, ++ "WARN": EClass.Warning, ++ "LOG": EClass.Log, ++ "INFO": EClass.Info, ++ "QA": EClass.QA, ++ }[eclass] ++ return "{}: {}".format(self.context.eclass.name, stage) ++ elif len(parts) > 2: ++ # Return an empty string, eclass and stage are populated anyway ++ return "" + + + class BodyState(AbstractState): |