/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: Martin Pool
  • Date: 2008-02-06 00:41:04 UTC
  • mfrom: (3215 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3219.
  • Revision ID: mbp@sourcefrog.net-20080206004104-mxtn32habuhjq6b8
Merge trunk

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