/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: Jelmer Vernooij
  • Date: 2017-02-05 15:38:26 UTC
  • mto: (6621.2.1 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: jelmer@jelmer.uk-20170205153826-rnrd0m3iqoizqvrw
Apply 2to3 except fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
382
382
        exec "import bzrlib.plugins.%s" % name in {}
383
383
    except KeyboardInterrupt:
384
384
        raise
385
 
    except errors.IncompatibleAPI, e:
 
385
    except errors.IncompatibleAPI as e:
386
386
        warning_message = (
387
387
            "Unable to load plugin %r. It requested API version "
388
388
            "%s of module %s but the minimum exported version is %s, and "
389
389
            "the maximum is %s" %
390
390
            (name, e.wanted, e.api, e.minimum, e.current))
391
391
        record_plugin_warning(name, warning_message)
392
 
    except Exception, e:
 
392
    except Exception as e:
393
393
        trace.warning("%s" % e)
394
394
        if re.search('\.|-| ', name):
395
395
            sanitised_name = re.sub('[-. ]', '_', name)
577
577
                    version_info = version_info.split('.')
578
578
                elif len(version_info) == 3:
579
579
                    version_info = tuple(version_info) + ('final', 0)
580
 
            except TypeError, e:
 
580
            except TypeError as e:
581
581
                # The given version_info isn't even iteratible
582
582
                trace.log_exception_quietly()
583
583
                version_info = (version_info,)
589
589
            return "unknown"
590
590
        try:
591
591
            version_string = _format_version_tuple(version_info)
592
 
        except (ValueError, TypeError, IndexError), e:
 
592
        except (ValueError, TypeError, IndexError) as e:
593
593
            trace.log_exception_quietly()
594
594
            # try to return something usefull for bad plugins, in stead of
595
595
            # stack tracing.