Mercurial > p > roundup > code
diff test/rest_common.py @ 5734:5cd9ac3daed7
Fixes for mysql and postgresql primary db.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 25 May 2019 19:32:18 -0400 |
| parents | 62bdcb874433 |
| children | 9c2e51aae18a |
line wrap: on
line diff
--- a/test/rest_common.py Sat May 25 18:40:45 2019 -0400 +++ b/test/rest_common.py Sat May 25 19:32:18 2019 -0400 @@ -644,7 +644,12 @@ # retry loop. Not sure why but I can force it # through the loop by setting the internal _db_type # setting once the db is created by the previous command. - self.db.Otk._db_type = whichdb("%s/%s"%(self.db.Otk.dir, self.db.Otk.name)) + try: + self.db.Otk._db_type = whichdb("%s/%s"%(self.db.Otk.dir, self.db.Otk.name)) + except AttributeError: + # if dir attribute doesn't exist the primary db is not + # sqlite or anydbm. So don't need to exercise code. + pass print("Now realtime start:", datetime.utcnow()) # don't set an accept header; json should be the default
