Use os.pathsep and .exe extension for mswin support

This commit is contained in:
Paul Korzhyk
2012-12-14 17:25:41 +11:00
parent a48d042e77
commit dd801db274

View File

@@ -74,7 +74,7 @@ def get_xmlsec_binary(paths=None):
if os.name == "posix":
bin_name = "xmlsec1"
elif os.name == "nt":
bin_name = "xmlsec"
bin_name = "xmlsec1.exe"
else: # Default !?
bin_name = "xmlsec1"
@@ -87,7 +87,7 @@ def get_xmlsec_binary(paths=None):
except Exception:
pass
for path in os.environ["PATH"].split(":"):
for path in os.environ["PATH"].split(os.pathsep):
fil = os.path.join(path, bin_name)
try:
if os.lstat(fil):