/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tools/package_mf.py

  • Committer: Breezy landing bot
  • Author(s): Colin Watson
  • Date: 2020-11-16 21:47:08 UTC
  • mfrom: (7521.1.1 remove-lp-workaround)
  • Revision ID: breezy.the.bot@gmail.com-20201116214708-jos209mgxi41oy15
Remove breezy.git workaround for bazaar.launchpad.net.

Merged from https://code.launchpad.net/~cjwatson/brz/remove-lp-workaround/+merge/393710

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
class CustomModuleFinder(modulefinder.ModuleFinder):
25
25
    """Custom module finder for processing python packages,
26
 
    e.g. bzr plugins packages.
 
26
    e.g. brz plugins packages.
27
27
 
28
28
    :param  path:   list of directories to search for modules;
29
29
                    if not specified, python standard library only is used.
32
32
    def __init__(self, path=None, debug=0, excludes=[], replace_paths=[]):
33
33
        if path is None:
34
34
            path = [os.path.dirname(os.__file__)]    # only python std lib
35
 
        modulefinder.ModuleFinder.__init__(self, path, debug, excludes,
36
 
            replace_paths)
 
35
        modulefinder.ModuleFinder.__init__(
 
36
            self, path, debug, excludes, replace_paths)
37
37
 
38
38
    def run_package(self, package_path):
39
39
        """Recursively process each module in package with run_script method.
59
59
 
60
60
    def get_result(self):
61
61
        """Return 2-tuple: (list of packages, list of modules)"""
62
 
        keys = self.modules.keys()
63
 
        keys.sort()
 
62
        keys = sorted(self.modules.keys())
64
63
        mods = []
65
64
        packs = []
66
65
        for key in keys:
82
81
 
83
82
    packs, mods = mf.get_result()
84
83
 
85
 
    print 'Packages:'
86
 
    print packs
 
84
    print('Packages:')
 
85
    print(packs)
87
86
 
88
 
    print 'Modules:'
89
 
    print mods
 
87
    print('Modules:')
 
88
    print(mods)