[blivet:master 1/3] Exit if the specified log file does not exist.

mulhern amulhern at redhat.com
Thu Mar 27 16:45:31 UTC 2014


If the log file does not exist, diff-quality will try to make it by calling
pylint. diff-quality passes some arguments to pylint which some versions
of pylint fail to recognize. In the event that one of these versions of
pylint is running diff-quality will raise an exception.

Better to catch it in the script than to leave diff-quality to its own
devices.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 scripts/pylintcodediff | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/pylintcodediff b/scripts/pylintcodediff
index e88f8c4..89bfefe 100755
--- a/scripts/pylintcodediff
+++ b/scripts/pylintcodediff
@@ -121,6 +121,9 @@ def main():
     commit = args.commit
     pylint_log = os.path.abspath(args.pylint_log)
 
+    if not os.path.isfile(pylint_log):
+        sys.exit("Pylint log file %s does not exist." % pylint_log)
+
     try:
         current_branch = current_branch_name()
         checkout_new_branch(branch)
-- 
1.8.3.1



More information about the anaconda-patches mailing list