summaryrefslogtreecommitdiff
path: root/django/utils/xmlutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/xmlutils.py')
-rw-r--r--django/utils/xmlutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/xmlutils.py b/django/utils/xmlutils.py
index 6638573857..a1eb5fb753 100644
--- a/django/utils/xmlutils.py
+++ b/django/utils/xmlutils.py
@@ -5,8 +5,9 @@ Utilities for XML generation/parsing.
from xml.sax.saxutils import XMLGenerator
class SimplerXMLGenerator(XMLGenerator):
- def addQuickElement(self, name, contents=None, attrs={}):
+ def addQuickElement(self, name, contents=None, attrs=None):
"Convenience method for adding an element with no children"
+ if attrs is None: attrs = {}
self.startElement(name, attrs)
if contents is not None:
self.characters(contents)