[jhbuild] jhbuild: Fix validation of <dep> elements



commit 7cdf167a0bb644cd229de9247234fc13826829fd
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Mar 20 16:10:31 2013 +0000

    jhbuild: Fix validation of <dep> elements

 jhbuild/modtypes/__init__.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
index 057b65a..2f68e27 100644
--- a/jhbuild/modtypes/__init__.py
+++ b/jhbuild/modtypes/__init__.py
@@ -82,14 +82,14 @@ def get_dependencies(node):
         for dep in childnode.childNodes:
             if dep.nodeType == dep.ELEMENT_NODE and dep.nodeName == 'dep':
                 typ = dep.getAttribute('type')
-                if not type:
+                if not typ:
                     raise FatalError(_('%(node)s node for %(module)s module is'
                                        ' missing %(attribute)s attribute') % \
                                      {'node_name'   : 'dep',
                                       'module_name' : node.getAttribute('id'),
                                       'attribute'   : 'type'})
                 name = dep.getAttribute('name')
-                if not type:
+                if not name:
                     raise FatalError(_('%(node)s node for %(module)s module is'
                                        ' missing %(attribute)s attribute') % \
                                      {'node_name'   : 'dep',


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