Message119666
Using -b command line option, os.get_exec_path() always produce a warning. Example:
$ ./python -b
>>> import os: os.get_exec_path({'PATH': ''})
.../Lib/os.py:395: BytesWarning: Comparison between bytes and string
path_listb = env[b'PATH']
['']
You can see such warning on some buildbots. This function should make this warning quiet because it is expected: it is not possible to check that a dict contains 'PATH' and b'PATH' keys without emiting a BytesWarning (see issue #9636).
Attached patch fixes this bug. It imports the warnings module in get_exec_path() function because os is a core module and it should not import too much modules. But... I'm not sure that it's the right way to fix this issue. |
|
Date |
User |
Action |
Args |
2010-10-27 00:58:06 | vstinner | set | recipients:
+ vstinner |
2010-10-27 00:58:06 | vstinner | set | messageid: <1288141086.46.0.441985990964.issue10210@psf.upfronthosting.co.za> |
2010-10-27 00:58:04 | vstinner | link | issue10210 messages |
2010-10-27 00:58:04 | vstinner | create | |
|