Lines Matching refs:self
87 def __init__(self): argument
88 self.path = None
89 self.isdir = False
90 self.target = None
91 self.owner = None
92 self.group = None
93 self.mode = None
94 self.hardkey = None
95 self.hardpaths = set()
96 self.editable = False
98 def name(self): argument
101 if self.isdir:
104 if self.target:
107 if self.hardkey:
112 def checkmodes(self, modechecks): argument
119 t = self.name()
122 m = int(self.mode, 8)
123 o = self.owner
124 p = self.path
136 e = self.editable
162 def __ne__(self, other): argument
176 if isinstance(self, ActionInfo):
177 lhs = self
181 rhs = self
246 def __str__(self): argument
252 name = self.name()
256 out += " " + label + str(getattr(self, member))
260 def protostr(self): argument
267 mode = self.mode
268 owner = self.owner
269 group = self.group
271 name = self.name()
278 target = self.target
284 (ftype, self.path, target, mode, owner, group, 0, 1)
289 def __init__(self, action, error): argument
290 Exception.__init__(self)
291 self.action = action
292 self.error = error
294 def __str__(self): argument
295 return "Error in '%s': %s" % (self.action, self.error)
304 def __init__(self, action): argument
305 FileInfo.__init__(self)
311 self.path = action.attrs["path"]
314 self.owner = action.attrs["owner"]
315 self.group = action.attrs["group"]
316 self.mode = action.attrs["mode"]
317 self.hash = action.hash
319 self.editable = True
327 self.target = os.path.normpath(target)
328 self.mediator = action.attrs.get("mediator")
330 self.owner = action.attrs["owner"]
331 self.group = action.attrs["group"]
332 self.mode = action.attrs["mode"]
333 self.isdir = True
341 self.hardkey = target
342 self.hardpaths.add(target)
359 def __init__(self, path, mode): argument
360 Exception.__init__(self)
361 self.path = path
362 self.mode = mode
364 def __str__(self): argument
365 return '%s: unsupported S_IFMT %07o' % (self.path, self.mode)
378 def __init__(self, root=None, path=None): argument
379 FileInfo.__init__(self)
380 self.path = path
389 self.hash = self.path
391 self.isdir = True
393 self.target = os.path.normpath(os.readlink(path))
394 self.mediator = None
399 self.mode = "%04o" % stat.S_IMODE(mode)
406 self.owner = "owner"
407 self.group = "group"
417 self.hardkey = lstat.st_ino
423 def __init__(self, name): argument
424 dict.__init__(self)
425 self.name = name
427 def compare(self, other): argument
430 keys1 = frozenset(list(self.keys()))
439 (self.name, other.name))
441 print(("\t%s" % str(self[path])))
446 (other.name, self.name))
453 if self[path] != other[path]:
457 % (self.name, other.name))
458 print(("%14s %s" % (self.name, self[path])))
469 def __str__(self): argument
470 return 'bad proto list entry: "%s"' % Exception.__str__(self)
478 def adddir(self, proto, exceptions): argument
522 self.update(newentries)
524 def addprotolist(self, protolist, exceptions): argument
574 self.update(newentries)
582 def __init__(self, mfile, error): argument
583 Exception.__init__(self)
584 self.mfile = mfile
585 self.error = error
587 def __str__(self): argument
588 return "unable to parse manifest %s: %s" % (self.mfile, self.error)
598 def addmanifest(self, root, mfile, arch, modechecks, exceptions): argument
655 if path in self:
677 self[path] = ActionInfo(action)
682 modewarnings.update(self[path].checkmodes(modechecks))
690 def adddir(self, mdir, arch, modechecks, exceptions): argument
697 self.addmanifest(mdir, mfile, arch, modechecks, exceptions)
701 def resolvehardlinks(self): argument
705 for info in list(self.values()):
708 if tgt in self:
709 tgtinfo = self[tgt]
719 def __init__(self, files, arch): argument
720 set.__init__(self)
723 self.readexceptionfile(fname, arch)
728 def readexceptionfile(self, efile, arch): argument
742 self.add(os.path.normpath(exc[0]))