439
416
trace.print_exception(sys.exc_info(), sys.stderr)
440
417
# GZ 2017-06-02: Move this name checking up a level, no point trying
441
418
# to import things with bad names.
443
420
sanitised_name = re.sub('[-. ]', '_', name)
444
421
if sanitised_name.startswith('brz_'):
445
422
sanitised_name = sanitised_name[len('brz_'):]
446
423
trace.warning("Unable to load %r in %r as a plugin because the "
450
427
return record_plugin_warning(
451
428
'Unable to load plugin %r from %r: %s' % (name, dir, e))