mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
gendummydata.py: Do not touch output file until we need it.
Ensures there's no leftover (empty) file if something during initialization fails. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
b6a34d013b
commit
11366b8a1a
1 changed files with 5 additions and 5 deletions
|
@ -50,11 +50,6 @@ if len(sys.argv) != 2:
|
|||
sys.stderr.write("Missing output filename argument");
|
||||
raise SystemExit
|
||||
|
||||
# Just let python throw the errors if any happen
|
||||
#
|
||||
out = open(sys.argv[1], "w")
|
||||
out.write("BEGIN;\n")
|
||||
|
||||
# make sure the seed file exists
|
||||
#
|
||||
if not os.path.exists(SEED_FILE):
|
||||
|
@ -177,6 +172,11 @@ trustedusers = []
|
|||
has_devs = 0
|
||||
has_tus = 0
|
||||
|
||||
# Just let python throw the errors if any happen
|
||||
#
|
||||
out = open(sys.argv[1], "w")
|
||||
out.write("BEGIN;\n")
|
||||
|
||||
# Begin by creating the User statements
|
||||
#
|
||||
if DBUG: print "Creating SQL statements for users.",
|
||||
|
|
Loading…
Add table
Reference in a new issue