refactor: apply code review remarks

This commit is contained in:
Rafal Kluszczynski 2016-05-24 22:39:59 +02:00
parent ee1e36219a
commit 457b0c0a2e
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class DatasetTreeBuilder:
def saveTreeInElasticSearchIfApplicable(args):
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
if es_url is not None and es_port is not None:
if es_url and es_port:
esi = ElasticSearchIndex(args)
d = datetime.utcnow()
unixtime = calendar.timegm(d.utctimetuple())

View File

@ -86,7 +86,7 @@ class FlowTreeBuilder:
def saveTreeInElasticSearchIfApplicable(args):
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
if es_url is not None and es_port is not None:
if es_url and es_port:
esi = ElasticSearchIndex(args)
d = datetime.utcnow()
unixtime = calendar.timegm(d.utctimetuple())