Changing class name causes process to 'hang'

Tim Johnson tim at johnsons-web.com
Sun Mar 13 12:20:11 EDT 2011


* Terry Reedy <tjreedy at udel.edu> [110312 17:45]:
> >## code below
> >     import cgi
> >     self.form = cgi.FieldStorage(keep_blank_values=1)
> >## /code
 
> And cgitools is a class therein?
  Code above is called with/from cgitools 
> >   Hmm! I'm unsure what you mean here, but
> 
> If the name 'cgitools' is used *somewhere*, not necessary in cgilib
> itself, other than in the class header itself, but the resulting
> NameError is *somehow* caught inside a retry loop, then your total
> application would exhibit the symptom you describe ('hanging'). 
  That is one thing that I have looked for - and so far I have found nothing.

> This could happen if there is a bare 'except:' statement (these
> are not recommended) that needs to be specific 'except
> SomeError:'.
 
> >The same happens if I 'alias' cgitools, as in
> >class CGI(cgitools):
> >     pass
> 
> You mean you leave 'class cgitools()...' alone within cgilib and
> just add that? That would discredit the theory above. What if you
> use a different alias, like 'moretools'? Are you on an OS where
> 'cgi' and 'CGI' could get confused?
  I am on linux. And the 'alias' was introduced experimentally after
  the symptoms began. And `CgiTools' also results in
  non-termination.

> >It is as if some gremlin lives on my system and insists that I use
> >the name `cgitools' and only the name `cgitools'. I'm sure
> >this comes from a side effect somewhere in the process.
> >thanks for the reply
  One other thing I just realized:
  The process stops inside of a function call to another object
  method, if that method call is removed, the process teminates.
  :) I may have a solution later today, and will relay it to you if
  found. Must have coffee first.

  thanks for your interest, I really appreciate it.
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com



More information about the Python-list mailing list