projects
/
update-copyright.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update exception handling to use `except X as Y` syntax.
[update-copyright.git]
/
update_copyright
/
project.py
diff --git
a/update_copyright/project.py
b/update_copyright/project.py
index 3202878507de1401f4790c5f738abc9bc61bdfe3..2a2c33aad078e1e5ef55eedb75e2b0358b6d8794 100644
(file)
--- a/
update_copyright/project.py
+++ b/
update_copyright/project.py
@@
-28,11
+28,11
@@
from . import utils as _utils
from .vcs.git import GitBackend as _GitBackend
try:
from .vcs.bazaar import BazaarBackend as _BazaarBackend
from .vcs.git import GitBackend as _GitBackend
try:
from .vcs.bazaar import BazaarBackend as _BazaarBackend
-except ImportError
,
_bazaar_import_error:
+except ImportError
as
_bazaar_import_error:
_BazaarBackend = None
try:
from .vcs.mercurial import MercurialBackend as _MercurialBackend
_BazaarBackend = None
try:
from .vcs.mercurial import MercurialBackend as _MercurialBackend
-except ImportError
,
_mercurial_import_error:
+except ImportError
as
_mercurial_import_error:
_MercurialBackend = None
_MercurialBackend = None
@@
-65,7
+65,7
@@
class Project (object):
clean_section = section.replace('-', '_')
try:
loader = getattr(self, '_load_{}_conf'.format(clean_section))
clean_section = section.replace('-', '_')
try:
loader = getattr(self, '_load_{}_conf'.format(clean_section))
- except AttributeError
,
e:
+ except AttributeError
as
e:
_LOG.error('invalid {} section'.format(section))
raise
loader(parser=parser)
_LOG.error('invalid {} section'.format(section))
raise
loader(parser=parser)