You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While developing features in Autosubmit I realized that the log module enforces a format on the message string even if no parameters were sent. This could be problematic when displaying formattable-like strings that are not intended to be formatted, like in this situation:
Log.info("This is a set of fruits: {apple, orange, banana}")
# Raise KeyError: 'apple, orange, banana'
This will crash since it will try to "This is a set of fruits: {apple, orange, banana}".format(*args) without any args.
I think that the log functions should be robust enough to deal with this to not trigger unwanted exceptions. This is critical because, in many parts of the code, we don't have full control of what is logged.
The text was updated successfully, but these errors were encountered:
While developing features in Autosubmit I realized that the log module enforces a format on the message string even if no parameters were sent. This could be problematic when displaying formattable-like strings that are not intended to be formatted, like in this situation:
This will crash since it will try to
"This is a set of fruits: {apple, orange, banana}".format(*args)
without anyargs
.I think that the log functions should be robust enough to deal with this to not trigger unwanted exceptions. This is critical because, in many parts of the code, we don't have full control of what is logged.
The text was updated successfully, but these errors were encountered: