From 676bfd9efb7ea50256d4caa1273e7c40e8f28511 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 27 Aug 2011 12:04:06 -0700 Subject: [PATCH] egencache: don't require xml in global scope --- bin/egencache | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/egencache b/bin/egencache index a87394c0d..53ae56582 100755 --- a/bin/egencache +++ b/bin/egencache @@ -368,14 +368,6 @@ class GenCache(object): "committing target: %s\n" % (ce,), level=logging.ERROR, noiselevel=-1) -class _MetadataTreeBuilder(ElementTree.TreeBuilder): - """ - Implements doctype() as required to avoid deprecation warnings with - >=python-2.7. - """ - def doctype(self, name, pubid, system): - pass - class GenUseLocalDesc(object): def __init__(self, portdb, output=None, preserve_comments=False): @@ -480,6 +472,14 @@ class GenUseLocalDesc(object): return 1 return (a > b) - (a < b) + class _MetadataTreeBuilder(ElementTree.TreeBuilder): + """ + Implements doctype() as required to avoid deprecation warnings + since Python >=2.7 + """ + def doctype(self, name, pubid, system): + pass + for cp in self._portdb.cp_all(): metadata_path = os.path.join(repo_path, cp, 'metadata.xml') try: -- 2.26.2