/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: Robert Collins
  • Date: 2008-02-01 04:01:33 UTC
  • mfrom: (3209 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3211.
  • Revision ID: robertc@robertcollins.net-20080201040133-7gc0fxqh3b8ot84x
Merge bzr.dev to resolve conflicts with register-branch NEWS items.

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