Skip to content

Commit

Permalink
[ancillary.which] pass arg 'mode' to shutil.which
Browse files Browse the repository at this point in the history
  • Loading branch information
johntruckenbrodt committed Jul 17, 2020
1 parent f4951b4 commit 6a2a67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spatialist/ancillary.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##############################################################
# core routines for software spatialist
# John Truckenbrodt 2014-2019
# John Truckenbrodt 2014-2020
##############################################################
"""
This script gathers central functions and classes for general applications
Expand Down Expand Up @@ -611,7 +611,7 @@ def which(program, mode=os.F_OK | os.X_OK):
the full path and name of the command
"""
if sys.version_info >= (3, 3):
return shutil.which(program)
return shutil.which(program, mode=mode)
else:
def is_exe(fpath, mode):
return os.path.isfile(fpath) and os.access(fpath, mode)
Expand Down

0 comments on commit 6a2a67b

Please sign in to comment.