Commit a1264c45 authored by Tristan Gingold's avatar Tristan Gingold

dep_file.py: remove unused functions.

parent 3ff20112
......@@ -127,30 +127,9 @@ class File(object):
def __str__(self):
return self.path
def __eq__(self, other):
_not_found = object()
path_self, path_other = [getattr(obj, "path", _not_found)
for obj in [self, other]]
if path_self is _not_found or path_other is _not_found:
return False
elif path_self != path_other:
return False
return True
def __hash__(self):
return hash(self.path)
def __cmp__(self, other):
if self.path < other.path:
return -1
if self.path == other.path:
return 0
if self.path > other.path:
return 1
def __ne__(self, other):
return not self.__eq__(other)
def extension(self):
"""Method that gets the extension for the file instance"""
tmp = self.path.rsplit('.')
......@@ -183,18 +162,6 @@ class DepFile(File):
# self._parse_if_needed()
return any([x.satisfies(rel_b) for x in self.rels])
def show_relations(self):
"""Print the file relations to stdout: can be used for logging"""
# self._parse_if_needed()
for relation in self.rels:
print(str(relation))
@property
def filename(self):
"""Property defined as a method that checks the basename of the file
path in the host, i.e. the name of the last directory on the path"""
return os.path.basename(self.file_path)
def get_dep_level(self):
"""Get the dependency level for the file instance, so we can order
later the full fileset"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment