Package saga
[hide private]
[frames] | no frames]

Source Code for Package saga

  1  #  Copyright (c) 2005-2008 Hartmut Kaiser 
  2  #  
  3  #  Distributed under the Boost Software License, Version 1.0. (See accompanying 
  4  #  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 
  5   
  6  # This file must be located inside a directory named SAGA which in turn should  
  7  # be located in a directory listed in your PYTHON_PATH 
  8   
  9  from _engine import *         # import all classes from SAGA.engine 
 10   
 11  import saga.name_space 
 12  import saga.file 
 13  import saga.advert 
 14  import saga.job 
 15  import saga.replica 
 16  import saga.cpr 
 17   
 18  ############################################################################### 
 19  # define classes needed for proper exception translation 
 20  ############################################################################### 
21 -class exception(Exception):
22 - def __init__(self, error):
23 Exception.__init__(self) 24 self._pimpl = error
25
26 - def __str__(self):
27 return self._pimpl.get_message()
28
29 - def get_message(self):
30 return self._pimpl.get_message()
31
32 - def get_error(self):
33 return self._pimpl.get_error()
34
35 - def get_object(self):
36 return self._pimpl.get_object()
37
38 - def __getattribute__(self, attr):
39 my_pimpl = super(exception, self).__getattribute__("_pimpl") 40 try: 41 return getattr(my_pimpl, attr) 42 except AttributeError: 43 return super(exception, self).__getattribute__(attr)
44 45 _engine.exception = exception 46 _engine._exception.py_err_class = exception 47 48 ###############################################################################
49 -class not_implemented(exception): pass
50 51 _engine.not_implemented = not_implemented 52 _engine._not_implemented.py_err_class = not_implemented 53 54 ###############################################################################
55 -class parameter_exception(exception): pass
56 57 _engine.parameter_exception = parameter_exception 58 _engine._parameter_exception.py_err_class = parameter_exception 59 60 ###############################################################################
61 -class incorrect_url(parameter_exception): pass
62 63 _engine.incorrect_url = incorrect_url 64 _engine._incorrect_url.py_err_class = incorrect_url 65 66 ###############################################################################
67 -class bad_parameter(parameter_exception): pass
68 69 _engine.bad_parameter = bad_parameter 70 _engine._bad_parameter.py_err_class = bad_parameter 71 72 ###############################################################################
73 -class state_exception(exception): pass
74 75 _engine.state_exception = state_exception 76 _engine._state_exception.py_err_class = state_exception 77 78 ###############################################################################
79 -class already_exists(state_exception): pass
80 81 _engine.already_exists = already_exists 82 _engine._already_exists.py_err_class = already_exists 83 84 ###############################################################################
85 -class does_not_exist(state_exception): pass
86 87 _engine.does_not_exist = does_not_exist 88 _engine._does_not_exist.py_err_class = does_not_exist 89 90 ###############################################################################
91 -class incorrect_state(state_exception): pass
92 93 _engine.incorrect_state = incorrect_state 94 _engine._incorrect_state.py_err_class = incorrect_state 95 96 ###############################################################################
97 -class timeout(state_exception): pass
98 99 _engine.timeout = timeout 100 _engine._timeout.py_err_class = timeout 101 102 ###############################################################################
103 -class security_exception(exception): pass
104 105 _engine.security_exception = security_exception 106 _engine._security_exception.py_err_class = security_exception 107 108 ###############################################################################
109 -class permission_denied(security_exception): pass
110 111 _engine.permission_denied = permission_denied 112 _engine._permission_denied.py_err_class = permission_denied 113 114 ###############################################################################
115 -class authorization_failed(security_exception): pass
116 117 _engine.authorization_failed = authorization_failed 118 _engine._authorization_failed.py_err_class = authorization_failed 119 120 ###############################################################################
121 -class authentication_failed(security_exception): pass
122 123 _engine.authentication_failed = authentication_failed 124 _engine._authentication_failed.py_err_class = authentication_failed 125 126 ###############################################################################
127 -class no_success(exception): pass
128 129 _engine.no_success = no_success 130 _engine._no_success.py_err_class = no_success 131