diff --git a/__init__.py b/__init__.py index 39bf46a..6837b08 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,6 @@ import optparse import os +import sys import xml_parser import reqif_conv @@ -83,4 +84,4 @@ if __name__ == '__main__': tex_path = os.path.abspath(os.path.splitext(reqif_path)[0] + '.tex') reqif_data = reqif_dict(reqif_path, 'Heading', 'Software Specification') reqif_conv.tex_gen(reqif_data, tex_path) - reqif_conv.pdf_gen(tex_path) + sys.exit(reqif_conv.pdf_gen(tex_path)) diff --git a/reqif_conv.py b/reqif_conv.py index 7e4ab44..c7c19c7 100644 --- a/reqif_conv.py +++ b/reqif_conv.py @@ -30,6 +30,8 @@ def pdf_gen(tex_path): exit_value = os.system("pdflatex -interaction nonstopmode %s 1> /dev/null" % tex_path) if exit_value != 0: print('FAILED') + return -1 break else: print('SUCCESS') + return 0