From 440544e1d2ab7f628f872cbb044c604158337eb9 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 28 Jan 2014 15:49:52 +0100 Subject: [PATCH] run_checks: Try running executable as fallback --- run_checks.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/run_checks.py b/run_checks.py index f5d9f547f..b8d033d6c 100644 --- a/run_checks.py +++ b/run_checks.py @@ -1,5 +1,6 @@ import sys -from pkg_resources import load_entry_point +import subprocess +from pkg_resources import load_entry_point, DistributionNotFound status = {} @@ -12,6 +13,15 @@ def run(name, args=None): load_entry_point(name, 'console_scripts', name)() except SystemExit as e: status[name] = e + except DistributionNotFound: + if args is None: + args = [] + try: + print('exc {}'.format([name, 'qutebrowser'] + args)) + status[name] = subprocess.call([name] + args) + except FileNotFoundError as e: + print('{}: {}'.format(e.__class__.__name__, e)) + status[name] = None except Exception as e: print(e) status[name] = None