Author seahoh
Recipients seahoh
Date 2019-08-20.15:59:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566316777.4.0.882745227499.issue37894@roundup.psfhosted.org>
In-reply-to
Content
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)
    ...
History
Date User Action Args
2019-08-20 15:59:37seahohsetrecipients: + seahoh
2019-08-20 15:59:37seahohsetmessageid: <1566316777.4.0.882745227499.issue37894@roundup.psfhosted.org>
2019-08-20 15:59:37seahohlinkissue37894 messages
2019-08-20 15:59:37seahohcreate