pld-ftp-admin: modules/ftptree.py - solve deprecationwarning

glen glen at pld-linux.org
Mon Mar 31 23:29:57 CEST 2008


Author: glen                         Date: Mon Mar 31 21:29:57 2008 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
- solve deprecationwarning

---- Files affected:
pld-ftp-admin/modules:
   ftptree.py (1.31 -> 1.32) 

---- Diffs:

================================================================
Index: pld-ftp-admin/modules/ftptree.py
diff -u pld-ftp-admin/modules/ftptree.py:1.31 pld-ftp-admin/modules/ftptree.py:1.32
--- pld-ftp-admin/modules/ftptree.py:1.31	Thu Jan 12 22:17:13 2006
+++ pld-ftp-admin/modules/ftptree.py	Mon Mar 31 23:29:52 2008
@@ -5,13 +5,20 @@
 from baseftptree import BasePkg, BaseFtpTree
 errnum=0
 
-SomeError="Oh no"
 quietmode=False
 
+import exceptions
+class SomeException(exceptions.Exception):
+    def __init__(self):
+        return
+
+    def __str__(self):
+        print "","An Error occured!"
+
 def bailoutonerror():
     if not errnum == 0:
         print "%d error(s) encountered... aborting" % errnum
-        raise SomeError
+        raise SomeException
 
 def pinfo(msg):
     print 'INFO: ' + msg
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/modules/ftptree.py?r1=1.31&r2=1.32&f=u



More information about the pld-cvs-commit mailing list