diff --git a/mkapachepw.py b/mkapachepw.py index d66d98a..a0142d6 100755 --- a/mkapachepw.py +++ b/mkapachepw.py @@ -9,7 +9,7 @@ # Program Information PROGNAME = "mkapachepw" -RCSID = "$Id: mkapachepw.py,v 1.111 2005/04/05 21:44:36 root Exp $" +RCSID = "$Id: mkapachepw.py,v 1.112 2005/04/05 21:56:30 root Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -345,7 +345,12 @@ # Group File -grfile = open(GRFILE, "w") +try: + grfile = open(GRFILE, "w") +except: + ErrorMsg("Cannot Open/Create File '%s'." % GRFILE) + sys.exit(3) + grfile.write(TIMESTAMP) grfile.write(CMDLINE) @@ -359,9 +364,15 @@ grfile.close() + # Password File -pwfile = open(PWFILE, "w") +try: + pwfile = open(PWFILE, "w") +except: + ErrorMsg("Cannot Open/Create File '%s'." % PWFILE) + sys.exit(3) + pwfile.write(TIMESTAMP) pwfile.write(CMDLINE)