-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
py-thrift-namespace-clash-check
type issue when logging with `-…
…-no-strict` mode (#7864) ### Problem When running `py-thrift-namespace-clash-check` in Twitter's sandbox with `--no-strict` mode, Pants crashed with the exception: ``` zip_longest argument #1 must support iteration ``` This is because we were trying to log a `NamespaceExtractionError`, and `log()` only understands `Union[str, Tuple[str, str]]`. ### Solution Fix the issue by using `str()` to get the underlying message. Also add an assertion to make sure that we don't introduce this issue again. Once we have MyPy set up, we can remove this assertion.
- Loading branch information
1 parent
20ac870
commit 2ebe6ec
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters