Skip to content

Commit

Permalink
siplify function
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Nov 13, 2024
1 parent 3d6dcbb commit bb0e65f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions QgisModelBaker/utils/gui_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,11 @@ def get_text_color_object(level: LogLevel = LogLevel.INFO) -> QColor:


def get_parsed_log_text_level(text) -> LogLevel:
textlines = text.splitlines()
for textline in textlines:
if textline.startswith("Warning:"):
return LogLevel.WARNING
elif "error" in textline.lower() or "failed" in textline.lower():
return LogLevel.FAIL
else:
return LogLevel.INFO
if text.startswith("Warning:"):
return LogLevel.WARNING
elif "error" in text.lower() or "failed" in text.lower():
return LogLevel.FAIL
return LogLevel.INFO


class SchemaDataFilterMode(IntEnum):
Expand Down

0 comments on commit bb0e65f

Please sign in to comment.