diff options
Diffstat (limited to 'rpkid/tests/sql-cleaner.py')
-rw-r--r-- | rpkid/tests/sql-cleaner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/tests/sql-cleaner.py b/rpkid/tests/sql-cleaner.py index 5d11781f..5db122e1 100644 --- a/rpkid/tests/sql-cleaner.py +++ b/rpkid/tests/sql-cleaner.py @@ -29,10 +29,10 @@ for name in ("rpkid", "irdbd", "pubd"): password = cfg.get("%s_sql_password" % name, "fnord") schema = [] - for line in getattr(rpki.sql_schemas, name).splitlines(): + for line in getattr(rpki.sql_schemas, name, "").splitlines(): schema.extend(line.partition("--")[0].split()) schema = " ".join(schema).strip(";").split(";") - schema = [statement.strip() for statement in schema if "DROP TABLE" not in statement] + schema = [statement.strip() for statement in schema if statement and "DROP TABLE" not in statement] for i in xrange(12): |