|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: cgi_client.py,v 1.74 2001-12-02 05:06:16 richard Exp $ |
| 18 | +# $Id: cgi_client.py,v 1.75 2001-12-04 01:25:08 richard Exp $ |
19 | 19 |
|
20 | 20 | __doc__ = """ |
21 | 21 | WWW request handler (also used in the stand-alone server). |
@@ -341,6 +341,7 @@ def shownode(self, message=None): |
341 | 341 | else: |
342 | 342 | message = _('nothing changed') |
343 | 343 | except: |
| 344 | + self.db.rollback() |
344 | 345 | s = StringIO.StringIO() |
345 | 346 | traceback.print_exc(None, s) |
346 | 347 | message = '<pre>%s</pre>'%cgi.escape(s.getvalue()) |
@@ -399,6 +400,7 @@ def showuser(self, message=None): |
399 | 400 | message = _('%(changes)s edited ok')%{'changes': |
400 | 401 | ', '.join(changed)} |
401 | 402 | except: |
| 403 | + self.db.rollback() |
402 | 404 | s = StringIO.StringIO() |
403 | 405 | traceback.print_exc(None, s) |
404 | 406 | message = '<pre>%s</pre>'%cgi.escape(s.getvalue()) |
@@ -560,6 +562,7 @@ def newnode(self, message=None): |
560 | 562 | # and some nice feedback for the user |
561 | 563 | message = _('%(classname)s created ok')%{'classname': cn} |
562 | 564 | except: |
| 565 | + self.db.rollback() |
563 | 566 | s = StringIO.StringIO() |
564 | 567 | traceback.print_exc(None, s) |
565 | 568 | message = '<pre>%s</pre>'%cgi.escape(s.getvalue()) |
@@ -1068,6 +1071,20 @@ def parsePropsFromForm(db, cl, form, nodeid=0): |
1068 | 1071 |
|
1069 | 1072 | # |
1070 | 1073 | # $Log: not supported by cvs2svn $ |
| 1074 | +# Revision 1.74 2001/12/02 05:06:16 richard |
| 1075 | +# . We now use weakrefs in the Classes to keep the database reference, so |
| 1076 | +# the close() method on the database is no longer needed. |
| 1077 | +# I bumped the minimum python requirement up to 2.1 accordingly. |
| 1078 | +# . #487480 ] roundup-server |
| 1079 | +# . #487476 ] INSTALL.txt |
| 1080 | +# |
| 1081 | +# I also cleaned up the change message / post-edit stuff in the cgi client. |
| 1082 | +# There's now a clearly marked "TODO: append the change note" where I believe |
| 1083 | +# the change note should be added there. The "changes" list will obviously |
| 1084 | +# have to be modified to be a dict of the changes, or somesuch. |
| 1085 | +# |
| 1086 | +# More testing needed. |
| 1087 | +# |
1071 | 1088 | # Revision 1.73 2001/12/01 07:17:50 richard |
1072 | 1089 | # . We now have basic transaction support! Information is only written to |
1073 | 1090 | # the database when the commit() method is called. Only the anydbm |
|
0 commit comments