Commit f5afd66e authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[flake8] fixes

parent 5d406a9ccf98
Pipeline #618 failed with stage
in 9 minutes and 47 seconds
...@@ -104,7 +104,7 @@ class IndexInES(Command): ...@@ -104,7 +104,7 @@ class IndexInES(Command):
try: try:
serializer = entity.cw_adapt_to('IFullTextIndexSerializable') serializer = entity.cw_adapt_to('IFullTextIndexSerializable')
json = serializer.serialize(complete=False) json = serializer.serialize(complete=False)
except Exception as e: except Exception:
cnx.error('[{}] Failed to serialize entity {} ({})'.format( cnx.error('[{}] Failed to serialize entity {} ({})'.format(
index_name, entity.eid, etype)) index_name, entity.eid, etype))
continue continue
......
...@@ -35,8 +35,9 @@ class RealESTestMixin(object): ...@@ -35,8 +35,9 @@ class RealESTestMixin(object):
def setUpClass(cls): def setUpClass(cls):
try: try:
httplib.HTTPConnection('localhost:9200').request('GET', '/') httplib.HTTPConnection('localhost:9200').request('GET', '/')
except: except: # noqa
raise unittest.SkipTest('No ElasticSearch on localhost, skipping test') raise unittest.SkipTest(
'No ElasticSearch on localhost, skipping test')
super(RealESTestMixin, cls).setUpClass() super(RealESTestMixin, cls).setUpClass()
def setup_database(self): def setup_database(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment