Skip to content

Commit

Permalink
Fixed bug in documentation string of NgasDROP
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Jul 19, 2022
1 parent 63d7df9 commit a7abe4c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tools/xml2palette/xml2palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,15 @@ def check_environment_variables():
value = os.environ.get(variable)

if value is None:
logging.error("No " + variable + " environment variable.")
return False
if variable == 'PROJECT_NAME':
os.environ['PROJECT_NAME'] = os.path.basename(os.path.abspath('.'))
elif variable == 'PROJECT_VERSION':
os.environ['PROJECT_VERSION'] = '0.1'
elif variable == 'GIT_REPO':
os.environ['GIT_REPO'] = os.environ['PROJECT_NAME']
else:
logging.error("No " + variable + " environment variable.")
return False

return True

Expand Down Expand Up @@ -1063,6 +1070,10 @@ def params_to_nodes(params):
level=logging.INFO,
)

# read environment variables
if not check_environment_variables():
sys.exit(1)

logging.info("PROJECT_NAME:" + os.environ.get("PROJECT_NAME"))
logging.info("PROJECT_VERSION:" + os.environ.get("PROJECT_VERSION"))
logging.info("GIT_REPO:" + os.environ.get("GIT_REPO"))
Expand All @@ -1077,10 +1088,6 @@ def params_to_nodes(params):
# create a temp directory for the output of doxygen
output_directory = tempfile.TemporaryDirectory()

# read environment variables
if not check_environment_variables():
sys.exit(1)

# add extra doxygen setting for input and output locations
DOXYGEN_SETTINGS.append(("PROJECT_NAME", os.environ.get("PROJECT_NAME")))
DOXYGEN_SETTINGS.append(("INPUT", inputdir))
Expand Down

0 comments on commit a7abe4c

Please sign in to comment.