~ubuntu-branches/ubuntu/oneiric/python-omniorb/oneiric

« back to all changes in this revision

Viewing changes to python/omniORB/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-05-12 08:33:48 UTC
  • mfrom: (2.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100512083348-7ajmbfaf876o0epx
Tags: 3.3-1ubuntu1
* Merge from debian unstable (LP: #607245). Remaining changes:
  -  Python 2.6 transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#    omniORB module -- omniORB specific things
29
29
 
30
30
 
31
 
# $Id: __init__.py,v 1.30.2.21 2008/02/01 16:29:16 dgrisby Exp $
 
31
# $Id: __init__.py,v 1.30.2.22 2008/08/21 10:53:55 dgrisby Exp $
32
32
# $Log: __init__.py,v $
 
33
# Revision 1.30.2.22  2008/08/21 10:53:55  dgrisby
 
34
# Hook Thread.__stop instead of __delete. Thanks Luke Deller.
 
35
#
33
36
# Revision 1.30.2.21  2008/02/01 16:29:16  dgrisby
34
37
# Error with implementation of operations with names clashing with
35
38
# Python keywords.
1024
1027
class omniThreadHook:
1025
1028
    def __init__(self, target):
1026
1029
        self.target            = target
1027
 
        self.target_del        = target._Thread__delete
1028
 
        target._Thread__delete = self.omni_thread_del
 
1030
        self.target_stop       = target._Thread__stop
 
1031
        target._Thread__stop   = self.omni_thread_stop
1029
1032
 
1030
 
    def omni_thread_del(self):
 
1033
    def omni_thread_stop(self):
1031
1034
        try:
1032
1035
            delattr(self.target, "__omni_thread")
1033
 
            del self.target._Thread__delete
 
1036
            del self.target._Thread__stop
1034
1037
        except AttributeError:
1035
1038
            pass
1036
 
        self.target_del()
 
1039
        self.target_stop()
1037
1040
 
1038
1041
 
1039
1042
# System exception mapping.