Skip to content

Commit

Permalink
Merge pull request #297 from duong77476/imp_disable_invalid_filters
Browse files Browse the repository at this point in the history
[IMP] disable_invalid_filter: show more detail warning
  • Loading branch information
pedrobaeza authored Jul 13, 2022
2 parents 96a0ddc + 2efc695 commit 0e45373
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions openupgradelib/openupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2381,20 +2381,23 @@ def format_message(f):
safe_eval(domain, globaldict),
limit=1,
)
except Exception:
except Exception as e:
logger.warning(
format_message(f) + "as it contains an invalid domain."
format_message(f) +
"as it contains an invalid domain %s. Detail: %s",
f.domain, e
)
f.active = False
continue
# CONTEXT GROUP BY
try:
context = safe_eval(f.context, globaldict)
assert(isinstance(context, dict))
except Exception:
except Exception as e:
logger.warning(
format_message(f) + "as it contains an invalid context %s.",
f.context
format_message(f) +
"as it contains an invalid context %s. Detail: %s",
f.context, e
)
f.active = False
continue
Expand Down

0 comments on commit 0e45373

Please sign in to comment.