From 98e409cf026b4b5bb267de18ba3d262b27532d8c Mon Sep 17 00:00:00 2001 From: Miguel Barao Date: Wed, 3 Jun 2015 14:17:20 +0100 Subject: [PATCH] - improved error message for scripts not found. --- questions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/questions.py b/questions.py index 8a1ad92..0386a1c 100644 --- a/questions.py +++ b/questions.py @@ -113,7 +113,7 @@ def question_generator(q): try: p = subprocess.Popen([q['script']], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) except FileNotFoundError: - print(' * Script {0} defined in question {1} could not be found'.format(q['script'], q['ref'])) + print(' * Script "{0}" defined in question "{1}" of file "{2}" could not be found'.format(q['script'], q['ref'], q['filename'])) try: qyaml = p.communicate(input=q['stdin'].encode('utf-8'), timeout=5)[0].decode('utf-8') @@ -378,7 +378,7 @@ class QuestionTextArea(Question): try: p = subprocess.Popen([self['correct']], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) except FileNotFoundError as e: - print(' * Script "{0}" defined in question "{1}" could not be found'.format(self['correct'], self['ref'])) + print(' * Script "{0}" defined in question "{1}" of file "{2}" could not be found'.format(self['correct'], self['ref'], self['filename'])) raise e try: -- libgit2 0.21.2