degal/filesystem.py
changeset 76 e22d9f699081
parent 68 49388e9fd5fa
child 77 2a53c5ade434
equal deleted inserted replaced
75:18b3b1926720 76:e22d9f699081
    68             self.parent = parent
    68             self.parent = parent
    69             
    69             
    70             # config, either as given, or copy from parent
    70             # config, either as given, or copy from parent
    71             if config :
    71             if config :
    72                 self.config = config
    72                 self.config = config
    73 
    73             
    74             else :
    74             elif parent : # XXX: else :
    75                 self.config = parent.config
    75                 self.config = parent.config
    76      
    76      
    77             # fsname
    77             # fsname
    78             if fsname :
    78             if fsname :
    79                 self.fsname = fsname
    79                 self.fsname = fsname
   204 
   204 
   205             else :
   205             else :
   206                 raise
   206                 raise
   207     
   207     
   208     # alias str/unicode
   208     # alias str/unicode
   209     str = path
   209     __str__ = path
   210     unicode = unicodepath
   210     __unicode__ = unicodepath
   211     
   211     
   212     def __repr__ (self) :
   212     def __repr__ (self) :
   213         """
   213         """
   214             Returns a str representing this dir
   214             Returns a str representing this dir
   215         """
   215         """
   543         """
   543         """
   544             Construct the directory tree root at the given 'real' path, which must be a raw str
   544             Construct the directory tree root at the given 'real' path, which must be a raw str
   545         """
   545         """
   546 
   546 
   547         # abuse Node's concept of a "name" a bit
   547         # abuse Node's concept of a "name" a bit
   548         super(Root, self).__init__(None, fspath, config=config)
   548         super(Root, self).__init__(None, fspath)
       
   549         
       
   550         # store our config
       
   551         self.config = config
   549 
   552 
   550     def nodepath (self) :
   553     def nodepath (self) :
   551         """
   554         """
   552             Just return ourself
   555             Just return ourself
   553         """
   556         """