/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/walker/walker.py

  • Committer: Tim Marston
  • Date: 2014-04-05 19:20:06 UTC
  • Revision ID: tim@ed.am-20140405192006-fv0toip4b8m5pc88
fixed bug preventing skipping of subdirectories in walker; also added
walker.File.__str__()

Show diffs side-by-side

added added

removed removed

63
63
                        # it shouldn't matter.  We adding an os.pathset to the end of the
64
64
                        # filename, so it wuill only match files that are descendents of a
65
65
                        # directory with the name of this file.
66
 
                        if not recurse: skip = rel_file + os.pathsep
 
66
                        if not recurse: skip = rel_file + os.sep
67
67
 
68
68
 
69
69
        class File:
91
91
                        elif self.type == '_': return 'missing'
92
92
                        else: return 'unknown'
93
93
 
 
94
                def __str__( self ):
 
95
                        type = self.type
 
96
                        if( self.link_type ): type += '/' + self.link_type
 
97
                        return 'File( %s (%s) )' % ( self.file, type )
 
98
 
94
99
 
95
100
        @staticmethod
96
101
        def generate_walk_list( full_dir, rel_file = '' ):