]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- solve deprecationwarning
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 31 Mar 2008 21:29:52 +0000 (21:29 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 31 Mar 2008 21:29:52 +0000 (21:29 +0000)
Changed files:
    modules/ftptree.py -> 1.32

modules/ftptree.py

index d75346736a1f20972b644b2bc9444d124773a634..b56f8126633325f1cf588615e55809c2f6cb1f0e 100644 (file)
@@ -5,13 +5,20 @@ from common import fileexists, noarchcachedir
 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
This page took 0.064956 seconds and 4 git commands to generate.