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