Fixed multiple message sending and added more verbouse warning regarding inconsistent ISPC_HOME
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user