aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/fetchers
diff options
context:
space:
mode:
authorYaron Yogev <yaronyogev@gmail.com>2017-08-28 04:45:37 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-28 04:45:37 +0000
commit23f0c36a014295988d5fcbf9f0bda0ae2cb54057 (patch)
treed1223339dc40a95d97b6abee08497036bd43f250 /app/discover/fetchers
parent1edf3399ad5419a0ba3242f86ac2addfef4bedcf (diff)
parenta51550978deaf77b08579e17cd36e6e943b7abc6 (diff)
Merge "fix fetching of Neutron DB name"
Diffstat (limited to 'app/discover/fetchers')
-rw-r--r--app/discover/fetchers/db/db_access.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/discover/fetchers/db/db_access.py b/app/discover/fetchers/db/db_access.py
index 47f4f9e..49fdb5e 100644
--- a/app/discover/fetchers/db/db_access.py
+++ b/app/discover/fetchers/db/db_access.py
@@ -52,10 +52,8 @@ class DbAccess(Fetcher):
# check if DB schema 'neutron' exists
cursor = DbAccess.conn.cursor(dictionary=True)
cursor.execute('SHOW DATABASES')
- matches = []
- for row in cursor:
- if 'neutron' in row.get('Database', ''):
- matches.append(row)
+ matches = [row.get('Database', '') for row in cursor
+ if 'neutron' in row.get('Database', '')]
if not matches:
raise ScanError('Unable to find Neutron schema in OpenStack DB')
if len(matches) > 1: