defining user exceptions

Michael Hoffman cam.ac.uk at mh391.invalid
Tue Apr 24 10:51:27 EDT 2007


CSUIDL PROGRAMMEr wrote:
> I am trying to write  a user defined exception that will catch for
> failed dependencies when a rpm is installed
> 
> try:
>  rpm -ivh  xxx.rpm --force;
> except  RPMError:
>    print  RPM failed dependency
> 
> 
> Can some one tell me how to define this RPMError. I looked at python
> docs but they were not useful.

http://docs.python.org/tut/node10.html#SECTION0010500000000000000000
-- 
Michael Hoffman



More information about the Python-list mailing list