diff options
| author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2012-12-05 17:09:46 +0100 |
|---|---|---|
| committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2012-12-05 17:09:46 +0100 |
| commit | 0edcd582ef1e3d787783dc13cc109f67e88dc4ba (patch) | |
| tree | 2cc39ddb1c7fcdbcb729fb4cc46390b2f619898b /rdflib/plugins/serializers/xmlwriter.py | |
| parent | b717791b28ee80dcf1fffc201e819d603dd60a30 (diff) | |
| download | rdflib-0edcd582ef1e3d787783dc13cc109f67e88dc4ba.tar.gz | |
misc minor cleanups
Diffstat (limited to 'rdflib/plugins/serializers/xmlwriter.py')
| -rw-r--r-- | rdflib/plugins/serializers/xmlwriter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rdflib/plugins/serializers/xmlwriter.py b/rdflib/plugins/serializers/xmlwriter.py index b9a10e21..867bf78f 100644 --- a/rdflib/plugins/serializers/xmlwriter.py +++ b/rdflib/plugins/serializers/xmlwriter.py @@ -8,7 +8,7 @@ ESCAPE_ENTITIES={ } class XMLWriter(object): - def __init__(self, stream, namespace_manager, encoding=None, decl=1, extra_ns={}): + def __init__(self, stream, namespace_manager, encoding=None, decl=1, extra_ns=None): encoding = encoding or 'utf-8' encoder, decoder, stream_reader, stream_writer = codecs.lookup(encoding) self.stream = stream = stream_writer(stream) @@ -16,7 +16,7 @@ class XMLWriter(object): stream.write('<?xml version="1.0" encoding="%s"?>' % encoding) self.element_stack = [] self.nm = namespace_manager - self.extra_ns=extra_ns + self.extra_ns=extra_ns or {} self.closed = True def __get_indent(self): |
