Author: remi
Date: 2008-09-17 10:34:17 +0200 (Wed, 17 Sep 2008)
New Revision: 1864

Added:
   
software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIExceptionCL.py
Log:
* added an exception class for the not allowed functions

Added: 
software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIExceptionCL.py
===================================================================
--- 
software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIExceptionCL.py
                                (rev 0)
+++ 
software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIExceptionCL.py
        2008-09-17 08:34:17 UTC (rev 1864)
@@ -0,0 +1,27 @@
+# -*- coding: latin1 -*-
+
+import version
+__author__ = version.author
+__date__ = version.date
+__version__ = version.version
+__licence__ = version.licence
+del version
+
+#    Copyright (C) 2008 C2ME Sa
+#    R�mi Jocaille <[EMAIL PROTECTED]>
+#    Distributed under the terms of the GNU General Public License
+#    http://www.gnu.org/copyleft/gpl.html
+
+from TuxAPIConst import *
+
+class TuxAPIExceptionCL(Exception):
+    
+    def __init__(self, value):
+        idx = CLIENT_LEVELS.index(value)
+        self.value = CLIENT_LEVELS_NAME[idx]
+        
+    def __str__(self):
+        strRes = 
"\n---------------------------------------------------------------------------"
+        strRes += "\nThis functionality is not allowed for the client level 
(%s)" % self.value
+        strRes += 
"\n---------------------------------------------------------------------------"
+        return strRes


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to