~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Alexander Belchenko
  • Date: 2007-11-19 22:54:30 UTC
  • mfrom: (3006 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3008.
  • Revision ID: bialix@ukr.net-20071119225430-x0ewosrsagis0yno
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
        except Exception, e:
192
192
            ## import pdb; pdb.set_trace()
193
193
            if re.search('\.|-| ', name):
194
 
                warning('Unable to load plugin %r from %r: '
195
 
                    'It is not a valid python module name.' % (name, d))
 
194
                sanitised_name = re.sub('[-. ]', '_', name)
 
195
                warning("Unable to load %r in %r as a plugin because file path"
 
196
                        " isn't a valid module name; try renaming it to %r."
 
197
                        % (name, d, sanitised_name))
196
198
            else:
197
199
                warning('Unable to load plugin %r from %r' % (name, d))
198
200
            log_exception_quietly()