From d654778675b0d90abf4e41342eaf4ef17c31562d Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 12 Jan 2012 22:28:57 +0100 Subject: Use unnamed variables in SPARQL queries if they are unused. --- dh_xul-ext | 8 ++++---- install-xpi | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dh_xul-ext b/dh_xul-ext index cea6e94..e003173 100755 --- a/dh_xul-ext +++ b/dh_xul-ext @@ -152,11 +152,11 @@ def _get_id_max_min_triple(install_rdf): PREFIX em: SELECT ?id ?max ?min WHERE { - ?x1 em:targetApplication ?x2 . - ?x2 em:id ?id . + [] em:targetApplication ?x . + ?x em:id ?id . OPTIONAL { - ?x2 em:maxVersion ?max . - ?x2 em:minVersion ?min . + ?x em:maxVersion ?max . + ?x em:minVersion ?min . } . } """, query_language="sparql") diff --git a/install-xpi b/install-xpi index ddd7b1a..f73b1bf 100755 --- a/install-xpi +++ b/install-xpi @@ -51,12 +51,12 @@ def get_query_field_id_as_list(rdf_path, query_string): def get_target_applications(install_rdf): target_applications = get_query_field_id_as_list(install_rdf, - "SELECT ?id WHERE { ?x1 em:targetApplication ?x2 . ?x2 em:id ?id }") + "SELECT ?id WHERE { [] em:targetApplication ?x . ?x em:id ?id }") return target_applications def get_extension_id(install_rdf): extension_ids = set(get_query_field_id_as_list(install_rdf, - "SELECT ?id WHERE {?x1 em:targetApplication ?x2 . ?x1 em:id ?id }")) + "SELECT ?id WHERE {?x em:targetApplication [] . ?x em:id ?id }")) return extension_ids.pop() def get_arch(package): -- cgit v1.2.3