2017-09-30 16:55:07 +02:00
|
|
|
--- a/Filter.py
|
|
|
|
+++ b/Filter.py
|
2017-09-30 17:19:04 +02:00
|
|
|
@@ -43,15 +43,15 @@ else:
|
|
|
|
|
|
|
|
|
|
|
|
def printInfo(pkg, reason, *details):
|
|
|
|
- _print("I", pkg, reason, details)
|
|
|
|
+ _print('I', pkg, reason, details)
|
|
|
|
|
|
|
|
|
|
|
|
def printWarning(pkg, reason, *details):
|
|
|
|
- _print("W", pkg, reason, details)
|
|
|
|
+ _print('W', pkg, reason, details)
|
|
|
|
|
|
|
|
|
|
|
|
def printError(pkg, reason, *details):
|
|
|
|
- _print("E", pkg, reason, details)
|
|
|
|
+ _print('E', pkg, reason, details)
|
|
|
|
|
|
|
|
|
|
|
|
def _print(msgtype, pkg, reason, details):
|
|
|
|
@@ -111,8 +111,10 @@ def printDescriptions(reason):
|
2017-09-30 16:55:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
def _diag_sortkey(x):
|
|
|
|
- xs = x.split()
|
|
|
|
- return (xs[2], xs[1])
|
|
|
|
+ xs = x.split(maxsplit=2)
|
2017-09-30 17:52:45 +02:00
|
|
|
+ # Sort Category (Info/Warnings/Errors), Diagnostic, Name
|
2017-09-30 16:55:07 +02:00
|
|
|
+ # ['game.x86_64:', 'W:', 'call-to-mktemp /usr/games/lib/blub\n']
|
2017-09-30 17:52:45 +02:00
|
|
|
+ return (str('IWE'.find(xs[1][0])), xs[2], xs[0])
|
2017-09-30 16:55:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
def printAllReasons():
|
2017-09-30 17:19:04 +02:00
|
|
|
@@ -121,7 +123,7 @@ def printAllReasons():
|
|
|
|
return False
|
|
|
|
|
|
|
|
global _diagnostic
|
|
|
|
- _diagnostic.sort(key=_diag_sortkey, reverse=True)
|
|
|
|
+ _diagnostic.sort(key=_diag_sortkey)
|
|
|
|
last_reason = ''
|
|
|
|
for diag in _diagnostic:
|
|
|
|
if Config.info:
|