Fixed multiple message sending and added more verbouse warning regarding inconsistent ISPC_HOME

This commit is contained in:
Anton Mitrokhin
2014-07-04 15:10:36 +04:00
parent 6348ca8da9
commit c2d65f7ad2
2 changed files with 17 additions and 2 deletions

View File

@@ -34,6 +34,7 @@
# // Author: Filippov Ilia
import sys
import os
import errno
import shutil
def write_to_file(filename, line):
@@ -49,6 +50,14 @@ def remove_if_exists(filename):
else:
os.remove(filename)
def make_sure_dir_exists(path):
try:
os.makedirs(path)
except OSError as exception:
if exception.errno != errno.EEXIST:
raise
# detect version which is printed after command
def take_lines(command, which):
os.system(command + " > " + "temp_detect_version")