[pitivi] etree: simplify code



commit de883993c365a69136c98c3fa445f745713b5f55
Author: Edward Hervey <bilboed bilboed com>
Date:   Tue Apr 7 20:39:53 2009 +0200

    etree: simplify code
---
 pitivi/formatters/etree.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pitivi/formatters/etree.py b/pitivi/formatters/etree.py
index c8e4309..56d7da1 100644
--- a/pitivi/formatters/etree.py
+++ b/pitivi/formatters/etree.py
@@ -49,17 +49,17 @@ def indent(elem, level=0):
         if level and (not elem.tail or not elem.tail.strip()):
             elem.tail = i
 
-class ElementTreeFormatterSaveContext(object):
+class ElementTreeFormatterContext(object):
     def __init__(self):
         self.streams = {}
         self.factories = {}
         self.track_objects = {}
 
-class ElementTreeFormatterLoadContext(object):
-    def __init__(self):
-        self.streams = {}
-        self.factories = {}
-        self.track_objects = {}
+class ElementTreeFormatterSaveContext(ElementTreeFormatterContext):
+    pass
+
+class ElementTreeFormatterLoadContext(ElementTreeFormatterContext):
+    pass
 
 class ElementTreeFormatter(Formatter):
     _element_id = 0



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