/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 bzrlib/plugin.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-25 19:59:40 UTC
  • mfrom: (3193.2.4 plugins.output)
  • Revision ID: pqm@pqm.ubuntu.com-20080125195940-iwy2onaiiges6k4t
(bialix) new formatting of `bzr plugins` output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
        if getattr(self.module, '__path__', None) is not None:
391
391
            return os.path.abspath(self.module.__path__[0])
392
392
        elif getattr(self.module, '__file__', None) is not None:
393
 
            return os.path.abspath(self.module.__file__)
 
393
            path = os.path.abspath(self.module.__file__)
 
394
            if path[-4:] in ('.pyc', '.pyo'):
 
395
                pypath = path[:-4] + '.py'
 
396
                if os.path.isfile(pypath):
 
397
                    path = pypath
 
398
            return path
394
399
        else:
395
400
            return repr(self.module)
396
401