diff --git a/warden_server/test_warden_server.py b/warden_server/test_warden_server.py index 2efe5b51c40b04df9cdec812b6bdd2fe6a0acfbe..fddf0a0e7bcdd66e604e2979d6f51b29e176623b 100755 --- a/warden_server/test_warden_server.py +++ b/warden_server/test_warden_server.py @@ -539,16 +539,14 @@ class PostgreSQL: conn.close() def _load_tags(self, cur): - with open(path.join(path.dirname(__file__), "tagmap_db.json"), - encoding="utf8") as tagmapf: + with open(path.join(path.dirname(__file__), "tagmap_db.json")) as tagmapf: tagmap = json.load(tagmapf) for tag, num in tagmap.items(): cur.execute( "INSERT INTO tags(id, tag) VALUES (%s, %s)", (num, tag)) def _load_cats(self, cur): - with open(path.join(path.dirname(__file__), "catmap_db.json"), - encoding="utf8") as catmapf: + with open(path.join(path.dirname(__file__), "catmap_db.json")) as catmapf: catmap = json.load(catmapf) for cat_subcat, num in catmap.items(): catsplit = cat_subcat.split(".", 1) @@ -592,8 +590,7 @@ class PostgreSQL: conn = self.ppg.connect(user=self.user, password=self.password, dbname=self.dbname, host='localhost') cur = conn.cursor() - with open(path.join(path.dirname(__file__), 'warden_3.0_postgres.sql'), - encoding="utf8") as script: + with open(path.join(path.dirname(__file__), 'warden_3.0_postgres.sql')) as script: statements = script.read() cur.execute(statements)