Commits

Michał Górny committed cb1674c

Reverse NewMakeConfFile / MakeConfFile inheritance to simplify.

Comments (0)

Files changed (1)

lib/flaggie/makeconf.py

 		return self._key
 
 class MakeConf(object):
-	class MakeConfFile(PackageFileSet.PackageFile):
+	class NewMakeConfFile(PackageFileSet.PackageFile):
 		class Token(object):
 			def __init__(self, s = ''):
 				self._modified = False
 				data += l.toString()
 			return data
 
-		def __init__(self, path, basedir = None):
+		def __init__(self, path):
 			list.__init__(self)
 			self.path = path
 			# not used in MakeConfFile
 			self._modified = False
 			self.trailing_whitespace = []
 
+	class MakeConfFile(NewMakeConfFile):
+		def __init__(self, path, basedir = None):
+			MakeConf.NewMakeConfFile.__init__(self, path)
+
 			def newtoken(kind, oldtoken = None):
 				if isinstance(oldtoken, kind):
 					return oldtoken
 
 			f.close()
 
-	class NewMakeConfFile(MakeConfFile):
-		def __init__(self, path):
-			list.__init__(self)
-			self.path = path
-			# not used in MakeConfFile
-			self._modified = False
-			self.trailing_whitespace = []
-
 	def __init__(self, paths, dbapi):
 		self.files = {}
 		self.variables = {}