|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-06 02:03:38 |
Hi. I am trying to make CherryPy redirect to the index page,
or send
back some default JSON encoded error, when the incorrect
number of
parameters are passed into one of my functions. I would like
some
recommendations on how to write catch-all error conditions
in CherryPy.
There doesn't seem to be a place to put a universal
try/except clause.
I don't see any explicit error event callbacks. What am I
missing?
Thank you in advance,
Gloria
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Weekly check for weak passwords? Where
is it done? |

|
2006-11-05 23:34:28 |
I don't know about mailing, but couldn't you just cron the
output of john?
Boyd Lynn Gerber wrote:
> Hello,
>
> I do not know where/what program I installed that
causes one system to
> send emails weekly telling of insecure passwords. I
have 20 systems
> with the same rpm -qa list. One system weekly sends
emails with a warning
> of using insecure password. Only one system does it.
I would like to
> find out why only one of 20 systems does it. They are
all using the same
> passwd group shadow file. And if I can believe
>
> # rpm -qa >> /tmp/allrpms-list
> # for i in `cat system-names`; do scp -p
$i:/tmp/allrpms-list
> /tmp/allrpms-list.$i; diff /tmp/allrpms-list
/tmp/allrpms-list.$i; done
>
> Then there is not differences between the systems. I
have been trying to
> find what program is generating it and I have been
unsucsessful. Can any
> one tell me what rpm/program does this weekly check?
>
> Thanks,
>
>
> --
> Boyd Gerber <gerberb zenez.com>
> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: opensuse+unsubscribe opensuse.org
> For additional commands, e-mail: opensuse+help opensuse.org
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: opensuse+unsubscribe opensuse.org
For additional commands, e-mail: opensuse+help opensuse.org
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-06 02:17:09 |
To be clear, I'm double=posting.
The default() method works for pages which map to nothing
valid. But it
does not work for a valid method receiving the wrong number
of
parameters. That is the case I wish to handle.
I also wish to manipulate the visible URL in the browser
when I handle
these cases. Please show me how to do this as well.
Thank you once again,
Gloria
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-06 14:29:06 |
Hi Gloria, could you send us a piece of your code - in order
to
understand what you have done?
Thanks.
Marcus
On 11/6/06, Gloria <strangest comcast.net> wrote:
>
> To be clear, I'm double=posting.
> The default() method works for pages which map to
nothing valid. But it
> does not work for a valid method receiving the wrong
number of
> parameters. That is the case I wish to handle.
>
> I also wish to manipulate the visible URL in the
browser when I handle
> these cases. Please show me how to do this as well.
>
> Thank you once again,
> Gloria
>
>
> >
>
--
Marcus Mendes
"A coragem é a forma de todas as virtudes em ponto de
prova" C.S.Lewis
______________________________________________
linuxUser #311365
phones : 55 31 3495-6403 or 55 31 8801-3304
jabber : mvmendesj jabber.org // msn: mvmendes hotmail.com
blog: mvmendes.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-06 23:33:11 |
Gloria wrote:
> There doesn't seem to be a place to put a universal
try/except clause.
Have you looked at the _cpOnError method in 2.2.1 (name may
have
changed to _cp_on_error or similar)
I do something similar to this:
def _cpOnError(self):
import traceback, StringIO
cherrypy.log(traceback.format_exc())
htmlfile = 'error.html'
error_page = open(htmlfile).read()
cherrypy.response.body = error_page
I am sure you can just as well raise and http redirect or
internal
redirect if you wish.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-10 20:59:10 |
This is exactly what I hoped for, thank you.
I have defined it as a global module, and also within my
class, and
neither get executed. Can you point me to an example where
this is
defined and used, and invoked by CP upon error?
I cannot find such a thing in the docs or examples that
exist, but I am
possibly overlooking something.
Thank you,
Gloria
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-10 21:00:30 |
PS: I am using CP 3.0 beta.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Catch-all exception handling in
CherryPy? |

|
2006-11-10 21:06:28 |
|
On 11/10/06, Gloria < strangest comcast.net">strangest comcast.net> wrote:
PS: I am using CP 3.0 beta.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~---
|