if st and stat.S_ISREG(st.st_mode):
return path
else:
- raise SubstitutionError("$(file {}) is not accessable or is not a regular file".format(path))
+ raise SubstitutionError("$(file {}) is not accessible or is not a regular file".format(path))
def sub_dir(v):
d = os.path.dirname(v)
if st and stat.S_ISDIR(st.st_mode):
return path
else:
- raise SubstitutionError("$(dir {}) is not accessable or is not a directory".format(path))
+ raise SubstitutionError("$(dir {}) is not accessible or is not a directory".format(path))
def sub_basename(v):
return os.path.splitext(os.path.basename(v))[0]