Update of /cvsroot/pythoncard/PythonCard/samples/webserver/html/cgi-bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9735/samples/webserver/html/cgi-bin
Modified Files:
contacts.py file_upload.py webservices.py
Log Message:
Making blanket except clauses more specific
Index: contacts.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/webserver/html/cgi-bin/contacts.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** contacts.py 24 Oct 2004 19:27:41 -0000 1.7
--- contacts.py 18 Sep 2005 03:59:22 -0000 1.8
***************
*** 30,34 ****
#self.displayRecord(0)
pass
! except:
pass
--- 30,34 ----
#self.displayRecord(0)
pass
! except Exception, msg:
pass
***************
*** 59,63 ****
s = s.replace('\n', '<BR>')
print "<b>%s:</b> %s<br>" % (k, s)
! except:
pass
print "<hr>"
--- 59,63 ----
s = s.replace('\n', '<BR>')
print "<b>%s:</b> %s<br>" % (k, s)
! except Exception, msg:
pass
print "<hr>"
Index: webservices.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/webserver/html/cgi-bin/webservices.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** webservices.py 11 Jun 2002 05:22:15 -0000 1.2
--- webservices.py 18 Sep 2005 03:59:22 -0000 1.3
***************
*** 79,83 ****
result = dispatch(method, params)
response = xmlrpclib.dumps(result, methodresponse=1)
! except:
response = xmlrpclib.dumps(xmlrpclib.Fault(1, "%s: %s" % sys.exc_info()[:2]))
print 'Content-type: text/xml'
--- 79,83 ----
result = dispatch(method, params)
response = xmlrpclib.dumps(result, methodresponse=1)
! except Exception, msg: # Should test for a particular Exception
response = xmlrpclib.dumps(xmlrpclib.Fault(1, "%s: %s" % sys.exc_info()[:2]))
print 'Content-type: text/xml'
Index: file_upload.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/webserver/html/cgi-bin/file_upload.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** file_upload.py 28 Jul 2004 16:04:18 -0000 1.2
--- file_upload.py 18 Sep 2005 03:59:22 -0000 1.3
***************
*** 36,40 ****
print "Upload of file %s was successful." % filename
! except:
print "Upload of file %s failed." % filename
--- 36,40 ----
print "Upload of file %s was successful." % filename
! except Exception, msg: # Should check for a particular Exception
print "Upload of file %s failed." % filename
|