Commit 425cce29 authored by Petr Pacner's avatar Petr Pacner

added checking of the uname - just logging.debug

parent 148f0b98
......@@ -28,7 +28,7 @@ import os
import sys
import platform
import logging
from subprocess import PIPE, Popen, CalledProcessError
from subprocess import PIPE, Popen, CalledProcessError, getstatusoutput
commands_os = 'auto'
......@@ -100,6 +100,13 @@ def check_windows_commands():
"""Check if we are using windows commands (del/type) and not a unix shell.
False on cygwin"""
if commands_os == 'auto':
status, _ = getstatusoutput("uname")
if status:
logging.debug("The uname command exists")
else:
logging.debug("The uname command does not exists")
return platform.system() == 'Windows'
else:
return commands_os == 'windows'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment