Skip to content

Commit

Permalink
Fix flake8 errors: E722 do not use bare except' (#51)
Browse files Browse the repository at this point in the history
Fix flake8 errors: E722 do not use bare except
  • Loading branch information
syxolk authored and di committed Dec 21, 2017
1 parent e02d2e4 commit 53cd400
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions vladiate/inputs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import io
try:
from urlparse import urlparse
except:
except ImportError:
from urllib.parse import urlparse
try:
from StringIO import StringIO
except:
except ImportError:
from io import StringIO

from vladiate.exceptions import MissingExtraException
Expand Down Expand Up @@ -45,7 +45,7 @@ def __init__(self, path=None, bucket=None, key=None):
try:
import boto # noqa
self.boto = boto
except:
except ImportError:
# 2.7 workaround, should just be `raise Exception() from None`
exc = MissingExtraException()
exc.__context__ = None
Expand Down
2 changes: 1 addition & 1 deletion vladiate/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
try:
from Queue import Empty
except:
except ImportError:
from queue import Empty
from multiprocessing import Pool, Queue
from vladiate import Vlad
Expand Down
2 changes: 1 addition & 1 deletion vladiate/test/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def mock_boto(result):
try:
import builtins
except:
except ImportError:
import __builtin__ as builtins
realimport = builtins.__import__

Expand Down
2 changes: 1 addition & 1 deletion vladiate/test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_run(monkeypatch):
monkeypatch.setattr('vladiate.main.main', main)
try:
monkeypatch.setattr('__builtin__.exit', exit)
except:
except ImportError:
monkeypatch.setattr('builtins.exit', exit)

run('__main__')
Expand Down

0 comments on commit 53cd400

Please sign in to comment.