diff options
author | Michael Elkins <melkins@tislabs.com> | 2010-10-29 17:16:21 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2010-10-29 17:16:21 +0000 |
commit | e0d2fac04fc2d001a4e9698902e2e8c74e6c2a83 (patch) | |
tree | 1fe7bfb90107c9b8cd14acd0f2913fb0e6c20bd1 /portal-gui | |
parent | 2609924d21203b765491367b24bdb7dd1653e4e2 (diff) |
adduser script should create empty csv files so portal-gui doesn't barf
svn path=/portal-gui/scripts/adduser.py; revision=3511
Diffstat (limited to 'portal-gui')
-rwxr-xr-x | portal-gui/scripts/adduser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/portal-gui/scripts/adduser.py b/portal-gui/scripts/adduser.py index e762b7c1..22454823 100755 --- a/portal-gui/scripts/adduser.py +++ b/portal-gui/scripts/adduser.py @@ -78,4 +78,12 @@ asn_csv=%(path)s/asns.csv roa_csv=%(path)s/roas.csv prefix_csv=%(path)s/prefixes.csv""" % { 'path': myrpki_dir } + # create empty csv files so portal-gui doesn't barf + for base in ['roas', 'asns', 'prefixes']: + fname = '%s/%s.csv' % (myrpki_dir, base) + if not os.path.exists(fname): + print 'creating ', fname + with open(fname, 'w') as f: + pass # just create an empty file + # vim:sw=4 ts=8 |