Commits

Michał Górny committed a80d8e7

Migrate PMContentObj to new StringCompat.

Comments (0)

Files changed (1)

gentoopm/basepm/contents.py

 import os.path
 from abc import abstractmethod, abstractproperty
 
-from ..util import ABCObject, StringCompat2
+from ..util import ABCObject, StringCompat
 
-class PMContentObj(StringCompat2):
-	def __init__(self, path):
-		self._path = os.path.normpath(path)
-
-	def __str__(self):
-		return self._path
+class PMContentObj(StringCompat):
+	def __new__(self, path):
+		return StringCompat.__new__(self, os.path.normpath(path))
 
 class PMPackageContents(ABCObject):
 	"""