From ce5544551ed5042871a169c4d3a74132a467ffea Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 27 Feb 2013 10:32:41 +0000 Subject: [PATCH] Allow app names as arguments We use the interface URI from the app's requirements. --- FeedLint.xml | 1 + feedlint | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/FeedLint.xml b/FeedLint.xml index eae30fe..c88c500 100644 --- a/FeedLint.xml +++ b/FeedLint.xml @@ -33,6 +33,7 @@ Run this on all your feeds from time-to-time to make sure they still work.FeedLint.xml + diff --git a/feedlint b/feedlint index 36d7db1..8ff905e 100755 --- a/feedlint +++ b/feedlint @@ -10,9 +10,12 @@ from logging import info from zeroinstall import SafeException from zeroinstall.injector import model, gpg, namespaces, qdom +from zeroinstall.injector.config import load_config from display import checking, result, error, highlight, error_new_line +config = load_config() + now = time.time() version = '0.8' @@ -69,8 +72,15 @@ if len(args) < 1: checked = set() +def arg_to_uri(arg): + app = config.app_mgr.lookup_app(arg, missing_ok = True) + if app is not None: + return app.get_requirements().interface_uri + else: + return model.canonical_iface_uri(a) + try: - to_check = [model.canonical_iface_uri(a) for a in args] + to_check = [arg_to_uri(a) for a in args] except SafeException, ex: if options.verbose: raise print >>sys.stderr, ex -- 2.11.4.GIT