This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author seahoh
Recipients seahoh
Date 2019-08-20.15:59:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The current code is:
    if os.path.dirname(cmd):
        if _access_check(cmd, mode):
            return cmd
        return None

In Windows, if 'cmd' include directory path and not include extension name, it return 'None'.
e.g. a file's path is 'd:\dir\app.exe', call shutil.which with 'cmd=="d:\dir\app"'.

How about this patch:
    if os.path.dirname(cmd):
        path, cmd = os.path.split(cmd)
Date User Action Args
2019-08-20 15:59:37seahohsetrecipients: + seahoh
2019-08-20 15:59:37seahohsetmessageid: <>
2019-08-20 15:59:37seahohlinkissue37894 messages
2019-08-20 15:59:37seahohcreate