/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

Merge up with bzr.dev.

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