[llvm-commits] CVS: llvm-www/releases/testregister.cgi
John Criswell
criswell at cs.uiuc.edu
Thu Dec 18 11:50:03 PST 2003
Changes in directory llvm-www/releases:
testregister.cgi updated: 1.8 -> 1.9
---
Log message:
Add code to unlock the file when done.
Added code that helps to ensure that we return successfully even if
writing to the logfile fails.
---
Diffs of the changes: (+11 -8)
Index: llvm-www/releases/testregister.cgi
diff -u llvm-www/releases/testregister.cgi:1.8 llvm-www/releases/testregister.cgi:1.9
--- llvm-www/releases/testregister.cgi:1.8 Thu Dec 18 11:31:42 2003
+++ llvm-www/releases/testregister.cgi Thu Dec 18 11:48:56 2003
@@ -151,11 +151,15 @@
#
# Open the logfile, lock it, and write a new entry.
#
- logfile = file (logfilename, 'a')
- fcntl.lockf (logfile, fcntl.LOCK_EX)
- logfile.write (email + ':' + lastname + ':' + firstname + '\n')
- logfile.flush ()
- logfile.close ()
+ try:
+ logfile = file (logfilename, 'a')
+ fcntl.lockf (logfile, fcntl.LOCK_EX)
+ logfile.write (email + ':' + lastname + ':' + firstname + '\n')
+ logfile.flush ()
+ fcntl.lockf (logfile, fcntl.LOCK_UN)
+ logfile.close ()
+ except:
+ pass
return
@@ -167,8 +171,7 @@
#
# Verify that everything in the form is correct.
#
-#error = ValidateForm (form)
-error = ''
+error = ValidateForm (form)
if (error != ''):
print ('Content-type: text/html')
print ('Status: 400 Bad Request')
@@ -186,7 +189,7 @@
#
# Subscribe the user the LLVM Announcements list (if they so desire)
#
-#Subscribe (form)
+Subscribe (form)
#
More information about the llvm-commits
mailing list