[jhbuild] sanitycheck: convert a loop of 1 element to a single try block



commit 32d126aa835f55b9ae31e2eae068dc50b650499f
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Fri Feb 28 21:40:34 2014 +0100

    sanitycheck: convert a loop of 1 element to a single try block
    
    Reviewed-by: Frédéric Péters <fpeters 0d be>

 jhbuild/commands/sanitycheck.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/jhbuild/commands/sanitycheck.py b/jhbuild/commands/sanitycheck.py
index c7b0da3..b335acb 100644
--- a/jhbuild/commands/sanitycheck.py
+++ b/jhbuild/commands/sanitycheck.py
@@ -108,13 +108,13 @@ class cmd_sanitycheck(Command):
                 except:
                     uprint(_('Could not find %s in XML catalog (usually part of package \'docbook-xsl\')') % 
name)
 
-        # Perl modules used by tools such as intltool:
-        for perlmod in [ 'XML::Parser' ]:
-            try:
-                get_output(['perl', '-M%s' % perlmod, '-e', 'exit'])
-            except:
-                uprint(_('Could not find the Perl module %s') % perlmod)
-                
+        # Perl module used by tools such as intltool:
+        perlmod = 'XML::Parser'
+        try:
+            get_output(['perl', '-M%s' % perlmod, '-e', 'exit'])
+        except:
+            uprint(_('Could not find the Perl module %s') % perlmod)
+
         # check for cvs:
         if not inpath('cvs', os.environ['PATH'].split(os.pathsep)):
             uprint(_('%s not found') % 'cvs')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]