/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-18 14:52:41 UTC
  • Revision ID: tim@ed.am-20140418145241-gldwc2ey6d2gjv96
defaulted Walker.generate_walk_list() to act on the.repo.full_dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
                        else:
80
80
                                self.type = '?'
81
81
                        if os.path.islink( self.file ):
82
 
                                self.link_type = type
 
82
                                self.link_type = self.type
83
83
                                self.type = 'l'
84
84
                        else:
85
85
                                self.link_type = False
98
98
 
99
99
 
100
100
        @staticmethod
101
 
        def generate_walk_list( full_dir, rel_file = '' ):
 
101
        def generate_walk_list( rel_file = '', full_dir = the.repo.full_dir ):
102
102
                """Returns a list of files and directories in full_dir, specified as relative
103
103
                files (relative to full_dir), breadth first.
104
104
                """
118
118
                        ret = [ rel_file ] if rel_file != '' else []
119
119
                        for file in os.listdir( full_file ):
120
120
                                ret.extend( Walker.generate_walk_list(
121
 
                                        full_dir, os.path.join( rel_file, file ) ) )
 
121
                                        os.path.join( rel_file, file ), full_dir ) )
122
122
                        return sorted( ret )
123
123
 
124
124
                # other kinds are invalid