/[rdiff-backup]/rdiff-backup/rdiff_backup/eas_acls.py
ViewVC logotype

Diff of /rdiff-backup/rdiff_backup/eas_acls.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by dgaudet, Sun Jun 19 19:44:38 2005 UTC revision 1.10 by dgaudet, Tue Jun 28 05:07:18 2005 UTC
# Line 47  class ExtendedAttributes: Line 47  class ExtendedAttributes:
47                  else: self.attr_dict = attr_dict                  else: self.attr_dict = attr_dict
48    
49          def __eq__(self, ea):          def __eq__(self, ea):
50                  """Equal if all attributes and index are equal"""                  """Equal if all attributes are equal"""
51                  assert isinstance(ea, ExtendedAttributes)                  assert isinstance(ea, ExtendedAttributes)
52                  return ea.index == self.index and ea.attr_dict == self.attr_dict                  return ea.attr_dict == self.attr_dict
53          def __ne__(self, ea): return not self.__eq__(ea)          def __ne__(self, ea): return not self.__eq__(ea)
54    
55          def get_indexpath(self): return self.index and '/'.join(self.index) or '.'          def get_indexpath(self): return self.index and '/'.join(self.index) or '.'
# Line 292  class AccessControlLists: Line 292  class AccessControlLists:
292    
293                  """                  """
294                  assert isinstance(acl, self.__class__)                  assert isinstance(acl, self.__class__)
                 if self.index != acl.index: return 0  
295                  if self.is_basic(): return acl.is_basic()                  if self.is_basic(): return acl.is_basic()
296                  return (self.cmp_entry_list(self.entry_list, acl.entry_list) and                  return (self.cmp_entry_list(self.entry_list, acl.entry_list) and
297                                  self.cmp_entry_list(self.default_entry_list,                                  self.cmp_entry_list(self.default_entry_list,
# Line 302  class AccessControlLists: Line 301  class AccessControlLists:
301                    
302          def eq_verbose(self, acl):          def eq_verbose(self, acl):
303                  """Returns same as __eq__ but print explanation if not equal"""                  """Returns same as __eq__ but print explanation if not equal"""
                 if self.index != acl.index:  
                         print "index %s not equal to index %s" % (self.index, acl.index)  
                         return 0  
304                  if not self.cmp_entry_list(self.entry_list, acl.entry_list):                  if not self.cmp_entry_list(self.entry_list, acl.entry_list):
305                          print "ACL entries for %s compare differently" % (self.index,)                          print "ACL entries for %s compare differently" % (self.index,)
306                          return 0                          return 0

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26