Code cleanup: Remove unused exception instances
This also gets rid of the old style syntax.
This commit is contained in:
parent
5fcc33b17a
commit
6baa292951
|
@ -254,7 +254,7 @@ cdef Eina_Bool _ecore_task_cb(void *data) with gil:
|
|||
|
||||
try:
|
||||
ret = obj._task_exec()
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
ret = 0
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ cdef Eina_Bool _ecore_timeline_cb(void *data, double pos) with gil:
|
|||
|
||||
try:
|
||||
ret = obj.func(pos, *obj.args, **obj.kargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
if not ret:
|
||||
|
|
|
@ -41,7 +41,7 @@ cdef Eina_Bool event_handler_cb(void *data, int type, void *event) with gil:
|
|||
|
||||
try:
|
||||
r = handler._exec(event)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
r = 0
|
||||
|
||||
|
|
|
@ -83,10 +83,10 @@ cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil:
|
|||
for cb in cbs:
|
||||
try:
|
||||
cb[0](self.owner, e, *cb[1], **cb[2])
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
return 1 # always return true, no matter what
|
||||
|
@ -128,7 +128,7 @@ cdef class ExeEventFilter:
|
|||
def callback_del(self, func, args, kargs):
|
||||
try:
|
||||
self.callbacks.remove((func, args, kargs))
|
||||
except ValueError, e:
|
||||
except ValueError:
|
||||
raise ValueError(
|
||||
"callback is not registered: %s, args=%s, kargs=%s" %
|
||||
(func, args, kargs))
|
||||
|
@ -161,7 +161,7 @@ cdef void _ecore_exe_pre_free_cb(void *data, const Ecore_Exe *exe) with gil:
|
|||
else:
|
||||
obj = <Exe>data
|
||||
obj._unset_obj()
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ cdef void fd_handler_prepare_cb(void *data, Ecore_Fd_Handler *fdh) with gil:
|
|||
func, args, kargs = obj._prepare_callback
|
||||
try:
|
||||
func(obj, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ cdef Eina_Bool fd_handler_cb(void *data, Ecore_Fd_Handler *fdh) with gil:
|
|||
|
||||
try:
|
||||
r = bool(obj._exec())
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
r = 0
|
||||
|
||||
|
@ -94,7 +94,7 @@ cdef class FdHandler(object):
|
|||
if not isinstance(fd, (int, long)):
|
||||
try:
|
||||
fd = fd.fileno()
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
raise ValueError("fd must be integer or have fileno()")
|
||||
|
||||
self.obj = ecore_main_fd_handler_add(fd,
|
||||
|
|
|
@ -21,7 +21,7 @@ cdef void _completion_cb(void *data, const char *file, int status) with gil:
|
|||
obj = <FileDownload>data
|
||||
try:
|
||||
obj._exec_completion(file, status)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef int _progress_cb(void *data, const char *file, long int dltotal,
|
||||
|
@ -29,7 +29,7 @@ cdef int _progress_cb(void *data, const char *file, long int dltotal,
|
|||
obj = <FileDownload>data
|
||||
try:
|
||||
return obj._exec_progress(file, dltotal, dlnow, ultotal, ulnow)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ cdef void _file_monitor_cb(void *data, Ecore_File_Monitor *em, Ecore_File_Event
|
|||
obj = <FileMonitor>data
|
||||
try:
|
||||
obj._exec_monitor(event, path)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ cdef void text_change_cb(void *data,
|
|||
func, args, kargs = self._text_change_cb
|
||||
try:
|
||||
func(self, _ctouni(part), *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ cdef void message_handler_cb(void *data,
|
|||
func, args, kargs = self._message_handler_cb
|
||||
try:
|
||||
func(self, Message_from_type(type, id, msg), *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ cdef void signal_cb(void *data, Evas_Object *obj,
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, _ctouni(emission), _ctouni(source), *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ cdef Elm_Object_Item *py_elm_xy_item_get_cb(Evas_Object *obj, Evas_Coord x, Evas
|
|||
try:
|
||||
ret = o.data["xy_item_get_cb"](o, x, y)
|
||||
it, xpos1, ypos1 = ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -212,7 +212,7 @@ cdef Evas_Object *py_elm_drag_icon_create_cb(
|
|||
|
||||
try:
|
||||
ret = createicon(win1, xoff1, yoff1, createdata)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -260,7 +260,7 @@ cdef void py_elm_drag_done_cb(void *data, Evas_Object *obj, Eina_Bool accepted)
|
|||
|
||||
try:
|
||||
donecb(o, <bint>accepted, donedata)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void py_elm_drag_accept_cb(void *data, Evas_Object *obj, Eina_Bool doaccept) with gil:
|
||||
|
@ -297,7 +297,7 @@ cdef void py_elm_drag_pos_cb(void *data, Evas_Object *obj,
|
|||
|
||||
try:
|
||||
dragpos(o, x, y, action, dragdata)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void py_elm_drag_item_container_pos(
|
||||
|
@ -354,7 +354,7 @@ cdef Eina_Bool py_elm_drop_item_container_cb(
|
|||
|
||||
try:
|
||||
ret = cb(o, item, evdata, xposret, yposret, cbdata)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
|
||||
|
@ -428,7 +428,7 @@ cdef Eina_Bool py_elm_item_container_data_get_cb(
|
|||
try:
|
||||
func = o.data["item_container_data_get_cb"]
|
||||
func(o, item, ret)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ cdef void _entry_context_menu_callback(void *data, Evas_Object *obj, void *event
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
callback(o, *a, **ka)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
@DEPRECATED("1.8", "Use markup_to_utf8() instead.")
|
||||
|
@ -702,7 +702,7 @@ cdef void py_elm_entry_filter_cb(void *data, Evas_Object *entry, char **text) wi
|
|||
cb_func, cb_data = <object>data
|
||||
try:
|
||||
ret = cb_func(en, _touni(text[0]), cb_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
if ret is None:
|
||||
|
|
|
@ -171,7 +171,7 @@ cdef Eina_Bool py_elm_fileselector_custom_filter_cb(const char *path, Eina_Bool
|
|||
cb_func, cb_data = <object>data
|
||||
try:
|
||||
return cb_func(_ctouni(path), is_dir, cb_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ cdef char *_py_elm_gengrid_item_text_get(void *data, Evas_Object *obj, const cha
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
ret = func(o, u, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -343,7 +343,7 @@ cdef Evas_Object *_py_elm_gengrid_item_content_get(void *data, Evas_Object *obj,
|
|||
|
||||
try:
|
||||
icon = func(o, u, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -364,7 +364,7 @@ cdef Eina_Bool _py_elm_gengrid_item_state_get(void *data, Evas_Object *obj, cons
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
ret = func(o, part, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
|
||||
|
@ -382,7 +382,7 @@ cdef void _py_elm_gengrid_object_item_del(void *data, Evas_Object *obj) with gil
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
func(o, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
item._unset_obj()
|
||||
|
@ -398,7 +398,7 @@ cdef void _py_elm_gengrid_item_func(void *data, Evas_Object *obj, void *event_in
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
item.cb_func(item, o, item.func_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef int _gengrid_compare_cb(const void *data1, const void *data2) with gil:
|
||||
|
@ -420,7 +420,7 @@ cdef int _gengrid_compare_cb(const void *data1, const void *data2) with gil:
|
|||
if ret is not None:
|
||||
try:
|
||||
return ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
else:
|
||||
|
|
|
@ -586,7 +586,7 @@ cdef char *_py_elm_genlist_item_text_get(void *data, Evas_Object *obj, const cha
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
ret = func(o, u, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -610,7 +610,7 @@ cdef Evas_Object *_py_elm_genlist_item_content_get(void *data, Evas_Object *obj,
|
|||
|
||||
try:
|
||||
icon = func(o, u, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -631,7 +631,7 @@ cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, cons
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
ret = func(o, u, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
|
||||
|
@ -649,7 +649,7 @@ cdef void _py_elm_genlist_object_item_del(void *data, Evas_Object *obj) with gil
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
func(o, item.item_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
item._unset_obj()
|
||||
|
@ -665,7 +665,7 @@ cdef void _py_elm_genlist_item_func(void *data, Evas_Object *obj, void *event_in
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
item.cb_func(item, o, item.func_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef int _py_elm_genlist_compare_func(const void *data1, const void *data2) with gil:
|
||||
|
@ -687,7 +687,7 @@ cdef int _py_elm_genlist_compare_func(const void *data1, const void *data2) with
|
|||
if ret is not None:
|
||||
try:
|
||||
return ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
else:
|
||||
|
|
|
@ -469,7 +469,7 @@ cdef Evas_Event_Flags _gesture_layer_taps_event_cb(void *data, void *event_info)
|
|||
try:
|
||||
ret = callback(ei, *args, **kwargs)
|
||||
return <Evas_Event_Flags>ret if ret is not None else EVAS_EVENT_FLAG_NONE
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef Evas_Event_Flags _gesture_layer_momentum_event_cb(void *data, void *event_info) with gil:
|
||||
|
@ -479,7 +479,7 @@ cdef Evas_Event_Flags _gesture_layer_momentum_event_cb(void *data, void *event_i
|
|||
try:
|
||||
ret = callback(ei, *args, **kwargs)
|
||||
return <Evas_Event_Flags>ret if ret is not None else EVAS_EVENT_FLAG_NONE
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef Evas_Event_Flags _gesture_layer_line_event_cb(void *data, void *event_info) with gil:
|
||||
|
@ -489,7 +489,7 @@ cdef Evas_Event_Flags _gesture_layer_line_event_cb(void *data, void *event_info)
|
|||
try:
|
||||
ret = callback(ei, *args, **kwargs)
|
||||
return <Evas_Event_Flags>ret if ret is not None else EVAS_EVENT_FLAG_NONE
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef Evas_Event_Flags _gesture_layer_zoom_event_cb(void *data, void *event_info) with gil:
|
||||
|
@ -499,7 +499,7 @@ cdef Evas_Event_Flags _gesture_layer_zoom_event_cb(void *data, void *event_info)
|
|||
try:
|
||||
ret = callback(ei, *args, **kwargs)
|
||||
return <Evas_Event_Flags>ret if ret is not None else EVAS_EVENT_FLAG_NONE
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef Evas_Event_Flags _gesture_layer_rotate_event_cb(void *data, void *event_info) with gil:
|
||||
|
|
|
@ -102,7 +102,7 @@ cdef int _index_compare_func(const void *data1, const void *data2) with gil:
|
|||
if ret is not None:
|
||||
try:
|
||||
return ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
else:
|
||||
|
@ -126,7 +126,7 @@ cdef int _index_data_compare_func(const void *data1, const void *data2) with gil
|
|||
if ret is not None:
|
||||
try:
|
||||
return ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
else:
|
||||
|
|
|
@ -32,7 +32,7 @@ cdef void layout_signal_callback(void *data, Evas_Object *obj,
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, _ctouni(emission), _ctouni(source), *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef class LayoutClass(Object):
|
||||
|
|
|
@ -269,7 +269,7 @@ cdef void _map_overlay_get_callback(void *data, Evas_Object *map, Elm_Map_Overla
|
|||
try:
|
||||
(func, args, kwargs) = <object>data
|
||||
func(obj, _elm_map_overlay_to_python(overlay), *args, **kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void _map_overlay_del_cb(void *data, Evas_Object *map, Elm_Map_Overlay *overlay) with gil:
|
||||
|
@ -283,7 +283,7 @@ cdef void _map_route_callback(void *data, Evas_Object *map, Elm_Map_Route *route
|
|||
(proute, func, args, kwargs) = <object>data
|
||||
try:
|
||||
func(obj, proute, *args, **kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
Py_DECREF(<object>data)
|
||||
|
@ -295,7 +295,7 @@ cdef void _map_name_callback(void *data, Evas_Object *map, Elm_Map_Name *name) w
|
|||
(pname, func, args, kwargs) = <object>data
|
||||
try:
|
||||
func(obj, pname, *args, **kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
Py_DECREF(<object>data)
|
||||
|
|
|
@ -86,7 +86,7 @@ cdef Eina_Bool _multibuttonentry_filter_callback(Evas_Object *obj, \
|
|||
|
||||
try:
|
||||
ret = callback(mbe, _ctouni(item_label), *a, **ka)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
return ret
|
||||
|
@ -97,7 +97,7 @@ cdef char * _multibuttonentry_format_cb(int count, void *data) with gil:
|
|||
try:
|
||||
s = callback(count, *a, **ka)
|
||||
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ cdef void _object_callback(void *data,
|
|||
else:
|
||||
ei = event_conv(<uintptr_t>event_info)
|
||||
func(obj, ei, *args, **kargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef bint _event_dispatcher(Object obj, Object src, Evas_Callback_Type t,
|
||||
|
@ -303,7 +303,7 @@ cdef bint _event_dispatcher(Object obj, Object src, Evas_Callback_Type t,
|
|||
for func, args, kargs in obj._elm_event_cbs:
|
||||
try:
|
||||
ret = func(obj, src, t, event_info, *args, **kargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
else:
|
||||
return ret
|
||||
|
@ -346,7 +346,7 @@ cdef void signal_callback(void *data, Evas_Object *obj,
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, _ctouni(emission), _ctouni(source), *args, **kargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ cdef void _object_item_callback(void *data, Evas_Object *obj, void *event_info)
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
item.cb_func(o, item, *item.args, **item.kwargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void _object_item_callback2(void *data, Evas_Object *obj, void *event_info) with gil:
|
||||
|
@ -94,7 +94,7 @@ cdef void _object_item_callback2(void *data, Evas_Object *obj, void *event_info)
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
item.cb_func(o, item, item.cb_data)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef class ObjectItem(object):
|
||||
|
|
|
@ -108,7 +108,7 @@ cdef Evas_Object *_py_elm_slideshow_item_get(void *data, Evas_Object *obj) with
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
ret = func(o, *item.args, **item.kwargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return NULL
|
||||
|
||||
|
@ -127,7 +127,7 @@ cdef void _py_elm_slideshow_item_del(void *data, Evas_Object *obj) with gil:
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
func(o, *item.args, **item.kwargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
# XXX: SlideShow item handling is weird
|
||||
|
@ -146,7 +146,7 @@ cdef int _py_elm_slideshow_compare_func(const void *data1, const void *data2) wi
|
|||
if ret is not None:
|
||||
try:
|
||||
return ret
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 0
|
||||
else:
|
||||
|
|
|
@ -120,7 +120,7 @@ cdef Eina_Bool store_fs_item_list_cb(void *data, Elm_Store_Item_Info *info) with
|
|||
func, args, kwargs = <object>data
|
||||
try:
|
||||
ret = func(ifs, args, kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
ifs.info_fs = NULL
|
||||
|
@ -137,7 +137,7 @@ cdef void store_item_fetch_cb(void *data, Elm_Store_Item *sti) with gil:
|
|||
func, args, kwargs = <object>data
|
||||
try:
|
||||
func(it, args, kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
it.sti = NULL
|
||||
|
@ -149,7 +149,7 @@ cdef void store_item_unfetch_cb(void *data, Elm_Store_Item *sti) with gil:
|
|||
func, args, kwargs = <object>data
|
||||
try:
|
||||
func(it, args, kwargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
it.sti = NULL
|
||||
|
|
|
@ -214,7 +214,7 @@ cdef void _toolbar_item_state_callback(void *data, Evas_Object *obj, void *event
|
|||
try:
|
||||
o = object_from_instance(obj)
|
||||
callback(o, item, *a, **ka)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
# The C item will be freed unless this is done
|
||||
|
|
|
@ -206,7 +206,7 @@ cdef void elm_transit_effect_transition_cb(Elm_Transit_Effect *effect, Elm_Trans
|
|||
|
||||
try:
|
||||
fect.transition_cb(tsit, progress)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void elm_transit_effect_end_cb(Elm_Transit_Effect *effect, Elm_Transit *transit) with gil:
|
||||
|
@ -216,7 +216,7 @@ cdef void elm_transit_effect_end_cb(Elm_Transit_Effect *effect, Elm_Transit *tra
|
|||
|
||||
try:
|
||||
fect.end_cb(tsit)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
Py_DECREF(fect)
|
||||
|
@ -235,7 +235,7 @@ cdef void elm_transit_del_cb(void *data, Elm_Transit *transit) with gil:
|
|||
|
||||
try:
|
||||
trans.del_cb(trans, *args, **kwargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
trans.obj = NULL
|
||||
|
|
|
@ -213,7 +213,7 @@ cdef void _web_console_message_hook(void *data, Evas_Object *obj, const char *me
|
|||
|
||||
try:
|
||||
self._console_message_hook(self, _ctouni(message), line_number, _ctouni(source_id))
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef class WebWindowFeatures(object):
|
||||
|
|
|
@ -115,7 +115,7 @@ cdef void _emotion_callback(void *data, Evas_Object *o, void *ei) with gil:
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(obj, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
|
@ -1136,7 +1136,7 @@ cdef class Emotion(evasObject):
|
|||
"""
|
||||
try:
|
||||
lst = self._emotion_callbacks[event]
|
||||
except KeyError, e:
|
||||
except KeyError:
|
||||
raise ValueError("function %s not associated with event %r" %
|
||||
(func, event))
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ cdef void _connect_cb(void *data, Ethumb_Client *client, Eina_Bool success) with
|
|||
try:
|
||||
func, args, kargs = self._on_connect_callback
|
||||
func(self, s, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
if not s and self.obj != NULL:
|
||||
|
@ -46,7 +46,7 @@ cdef void _on_server_die_cb(void *data, Ethumb_Client *client) with gil:
|
|||
try:
|
||||
func, args, kargs = self._on_server_die_callback
|
||||
func(self, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
if self.obj != NULL:
|
||||
|
@ -65,7 +65,7 @@ cdef void _generated_cb(void *data, Ethumb_Client *client, int id, const char *f
|
|||
s = bool(success != 0)
|
||||
try:
|
||||
func(self, id, f, k, tp, tk, s, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
cdef void _generated_cb_free_data(void *data) with gil:
|
||||
|
|
|
@ -23,7 +23,7 @@ cdef int cb_canvas_dispatcher(Canvas self, event, int type) except 0:
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, event, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 1
|
||||
|
||||
|
@ -34,7 +34,7 @@ cdef int cb_canvas_dispatcher2(Canvas self, int type) except 0:
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 1
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ cdef void obj_free_cb(void *data, Evas *e,
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, *args, **kargs)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
_object_unregister_callbacks(self)
|
||||
|
|
|
@ -22,7 +22,7 @@ cdef int cb_object_dispatcher(Object self, event, int type) except 0:
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, event, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 1
|
||||
|
||||
|
@ -33,7 +33,7 @@ cdef int cb_object_dispatcher2(Object self, int type) except 0:
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(self, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 1
|
||||
|
||||
|
|
|
@ -35,63 +35,63 @@ cdef void _smart_object_delete(Evas_Object *o) with gil:
|
|||
|
||||
try:
|
||||
obj._m_delete(obj)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
if type(obj.delete) is types.MethodType:
|
||||
try:
|
||||
del obj.delete
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.move) is types.MethodType:
|
||||
try:
|
||||
del obj.move
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.resize) is types.MethodType:
|
||||
try:
|
||||
del obj.resize
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.show) is types.MethodType:
|
||||
try:
|
||||
del obj.show
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.hide) is types.MethodType:
|
||||
try:
|
||||
del obj.hide
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.color_set) is types.MethodType:
|
||||
try:
|
||||
del obj.color_set
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.clip_set) is types.MethodType:
|
||||
try:
|
||||
del obj.clip_set
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.clip_unset) is types.MethodType:
|
||||
try:
|
||||
del obj.clip_unset
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.calculate) is types.MethodType:
|
||||
try:
|
||||
del obj.calculate
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.member_add) is types.MethodType:
|
||||
try:
|
||||
del obj.member_add
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
if type(obj.member_del) is types.MethodType:
|
||||
try:
|
||||
del obj.member_del
|
||||
except AttributeError, e:
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
obj._smart_callbacks = None
|
||||
|
@ -115,7 +115,7 @@ cdef void _smart_object_move(Evas_Object *o,
|
|||
if obj._m_move is not None:
|
||||
try:
|
||||
obj._m_move(obj, x, y)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -126,7 +126,7 @@ cdef void _smart_object_resize(Evas_Object *o,
|
|||
if obj._m_resize is not None:
|
||||
try:
|
||||
obj._m_resize(obj, w, h)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -136,7 +136,7 @@ cdef void _smart_object_show(Evas_Object *o) with gil:
|
|||
if obj._m_show is not None:
|
||||
try:
|
||||
obj._m_show(obj)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -146,7 +146,7 @@ cdef void _smart_object_hide(Evas_Object *o) with gil:
|
|||
if obj._m_hide is not None:
|
||||
try:
|
||||
obj._m_hide(obj)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ cdef void _smart_object_color_set(Evas_Object *o,
|
|||
if obj._m_color_set is not None:
|
||||
try:
|
||||
obj._m_color_set(obj, r, g, b, a)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -169,7 +169,7 @@ cdef void _smart_object_clip_set(Evas_Object *o, Evas_Object *clip) with gil:
|
|||
if obj._m_clip_set is not None:
|
||||
try:
|
||||
obj._m_clip_set(obj, other)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -179,7 +179,7 @@ cdef void _smart_object_clip_unset(Evas_Object *o) with gil:
|
|||
if obj._m_clip_unset is not None:
|
||||
try:
|
||||
obj._m_clip_unset(obj)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -189,7 +189,7 @@ cdef void _smart_object_calculate(Evas_Object *o) with gil:
|
|||
if obj._m_calculate is not None:
|
||||
try:
|
||||
obj._m_calculate(obj)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -201,7 +201,7 @@ cdef void _smart_object_member_add(Evas_Object *o, Evas_Object *clip) with gil:
|
|||
if obj._m_member_add is not None:
|
||||
try:
|
||||
obj._m_member_add(obj, other)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -213,7 +213,7 @@ cdef void _smart_object_member_del(Evas_Object *o, Evas_Object *clip) with gil:
|
|||
if obj._m_member_del is not None:
|
||||
try:
|
||||
obj._m_member_del(obj, other)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -228,7 +228,7 @@ cdef void _smart_callback(void *data,
|
|||
for func, args, kargs in lst:
|
||||
try:
|
||||
func(obj, ei, *args, **kargs)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
@ -493,7 +493,7 @@ cdef class SmartObject(Object):
|
|||
"""
|
||||
try:
|
||||
lst = self._smart_callbacks[event]
|
||||
except KeyError, e:
|
||||
except KeyError:
|
||||
raise ValueError("Unknown event %r" % event)
|
||||
|
||||
i = -1
|
||||
|
|
Loading…
Reference in New Issue