[FRPythoneers] Question about Try/Except

Eric Brunson brunson at level3.net
Mon Jun 3 15:10:59 MDT 2002


There's a variable, 'keep_blank_values', that can be set to control
the the behavior of agi.FieldStorage().  It usually defaults to 0, but
you should check that it wasn't modified by whoever installed python
on your HP/UX box.  Setting keep_blank_values no a true value would
cause what you are seeing.

* J. Wayde Allen (wallen at lug.boulder.co.us) [020603 15:03]:
> 
> OK, just had a new twist on things.  I was using the following structure
> in my cgi script:
> 
>    try:
>       surname = form["last_name"].value
>    except:
>       Display("You must supply a first and last name.  Please go back.")
>       raise SystemExit
> 
> which would display my message if no last_name was entered on the web
> form.  However, when the script was transfered from my Linux box to the
> HP-UX server this is no longer the case.  Now, I just get blank data
> fields and no exception is raised.  Any ideas?
> 
> - Wayde
>   (wallen at lug.boulder.co.us)
> 
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers


-- 
      Eric Brunson        brunson at level3 dot net
tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY



More information about the FRPythoneers mailing list