diff bitten/util/xmlio.py @ 121:381233a91db6

Fix for the {{{unittest}}} command, which was raising an exception but swallowing the traceback.
author cmlenz
date Mon, 08 Aug 2005 15:42:03 +0000
parents 77dd69f7c405
children 3ed8f568f60a
line wrap: on
line diff
--- a/bitten/util/xmlio.py
+++ b/bitten/util/xmlio.py
@@ -131,14 +131,14 @@
     """
     __slots__ = ['name', 'attr']
 
-    def __init__(self, *args, **attr):
+    def __init__(self, name_, **attr):
         """Create an XML element using the specified tag name.
         
         The tag name must be supplied as the first positional argument. All
         keyword arguments following it are handled as attributes of the element.
         """
         Fragment.__init__(self)
-        self.name = args[0]
+        self.name = name_
         self.attr = dict([(name, value) for name, value in attr.items()
                           if value is not None])
 
@@ -164,7 +164,7 @@
 
     __slots__ = []
 
-    def __init__(self, parent, name, **attr):
+    def __init__(self, parent_, name_, **attr):
         """Create an XML element using the specified tag name.
         
         The first positional argument is the instance of the parent element that
@@ -172,8 +172,8 @@
         the name of the tag. All keyword arguments are handled as attributes of
         the element.
         """
-        Element.__init__(self, name, **attr)
-        parent.append(self)
+        Element.__init__(self, name_, **attr)
+        parent_.append(self)
 
 
 def parse(text):
Copyright (C) 2012-2017 Edgewall Software