Is the python module catching all exceptions?<div><br></div><div>You need to make sure you don't mask out the KeyboardInterrupt exception... otherwise, you may prevent Control-C from being passed up the stack.</div><div>
<br></div><div>I'm not sure if that's your issue, but it sounds like it could be. It's considered a Python best practice to explicitly catch the exact exceptions that you know how to handle, and let exceptions that you're not going to handle directly trickle up.</div>
<div><br></div><div>That is to say that you should never do something like:</div><div><br></div><div>try:</div><div> <some code></div><div>except:</div><div> <some code></div><div><br></div><div>because you *will* end up masking things like KeyboardInterrupt.</div>
<div><br></div><div>You should always do something like:</div><div><br></div><div>try:</div><div> <some code></div><div>except TheExceptionClass:</div><div> <some code></div><div><br></div><div>HTH,</div>
<div><br></div><div>- Terry</div><div><br></div><div><div class="gmail_quote">On Wed, Jan 26, 2011 at 2:47 PM, McCann, Brian <span dir="ltr"><<a href="mailto:bmccann@andmore.com">bmccann@andmore.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all. I've got freeradius working using a python library for auth, but something interesting happened when I did. When I run "radius -X", and press CRTL+C, it no longer exits. It just returns "Ready to process requests.". The PID doesn't change, so it's not like its exiting and restarting.<br>
<br>
I looked at <a href="http://wiki.freeradius.org/Rlm_perl" target="_blank">http://wiki.freeradius.org/Rlm_perl</a> (yes...I know...perl != python, but as the python page doesn't say much, I'm going on the perl page for a starting point) and it doesn't look like the script has to do anything to handle exits. Does anyone know what I'm missing?<br>
<br>
Thanks,<br>
--Brian<br>
<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</blockquote></div><br></div>