Ensure we're not using the database we're about to drop

This commit is contained in:
D. Berge
2020-09-02 16:39:49 +02:00
parent faf1a0d83f
commit ffd021a23e

View File

@@ -45,7 +45,7 @@ runner = "RUNNER_NOEXPORT=true RUNNER_IMPORT=true " + os.path.join(bin_path, "ru
print(system_exports) print(system_exports)
#os.system(system_exports) #os.system(system_exports)
cmd = f"psql -U {dbuser} -c 'DROP DATABASE {dbname};'" cmd = f"psql -U {dbuser} -d template1 -c 'DROP DATABASE {dbname};'"
print(cmd) print(cmd)
res = os.system(cmd) res = os.system(cmd)
if res != 0: if res != 0: