Message396855
If you pass None to the quote_from_bytes function, then there is no point in the "if not bs" check, because it won't even reach it.
This function is not with dynamic behavior, which violates python concepts. If you pass a string instead of bytes, it will throw a TypeError exception, it's ok. But if for some reason you need to pass None, and this happens, then the function does not behave as expected.
Why even check that bs is not None, if this can never be? And if it does, there will always be a TypeError exception. |
|
Date |
User |
Action |
Args |
2021-07-02 11:34:53 | asicscwcs | set | recipients:
+ asicscwcs, orsenthil, eric.smith, serhiy.storchaka, iritkatriel |
2021-07-02 11:34:53 | asicscwcs | set | messageid: <1625225693.13.0.854095096443.issue44520@roundup.psfhosted.org> |
2021-07-02 11:34:53 | asicscwcs | link | issue44520 messages |
2021-07-02 11:34:53 | asicscwcs | create | |
|