loadbalancer-controller
loadbalancer-controller copied to clipboard
TypeError: not enough arguments for format string
https://github.com/sendgrid/krampus/blob/738f00652abc93302db5b1205ab3ba45f2507463/kinder/lambda_funcs.py#L36
>>> try:
... raise ValueError
... except Exception as e:
... print("could not delete function '%s', unknown error: %s" % str(e))
...
Traceback (most recent call last):
File "<input>", line 2, in <module>
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 4, in <module>
TypeError: not enough arguments for format string
# minimal example
>>> "could not delete function '%s', unknown error: %s" % "Exception string..."
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: not enough arguments for format string
It seems like adding self.func
as the first string might be the answer:
KLog.log("could not delete function '%s', unknown error: %s" % (self.func, str(e)), "critical")