]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix a few get_name() calls and turn then to .name
authorBenjamin Peterson <benjamin@python.org>
Fri, 22 Aug 2008 20:43:48 +0000 (20:43 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 22 Aug 2008 20:43:48 +0000 (20:43 +0000)
Reviewer: Christian Heimes

Lib/threading.py

index 4933cab4be68434674e5a1eae926069d6c94fceb..7a5877355f804a88bb8ba0c3b892c11415ee475c 100644 (file)
@@ -67,7 +67,7 @@ if __debug__:
             if self.__verbose:
                 format = format % args
                 format = "%s: %s\n" % (
-                    current_thread().get_name(), format)
+                    current_thread().name, format)
                 _sys.stderr.write(format)
 
 else:
@@ -110,7 +110,7 @@ class _RLock(_Verbose):
         owner = self.__owner
         return "<%s(%s, %d)>" % (
                 self.__class__.__name__,
-                owner and owner.get_name(),
+                owner and owner.name,
                 self.__count)
 
     def acquire(self, blocking=1):
@@ -534,7 +534,7 @@ class Thread(_Verbose):
                 # self.
                 if _sys:
                     _sys.stderr.write("Exception in thread %s:\n%s\n" %
-                                      (self.get_name(), _format_exc()))
+                                      (self.name, _format_exc()))
                 else:
                     # Do the best job possible w/o a huge amt. of code to
                     # approximate a traceback (code ideas from
@@ -542,7 +542,7 @@ class Thread(_Verbose):
                     exc_type, exc_value, exc_tb = self.__exc_info()
                     try:
                         print>>self.__stderr, (
-                            "Exception in thread " + self.get_name() +
+                            "Exception in thread " + self.name +
                             " (most likely raised during interpreter shutdown):")
                         print>>self.__stderr, (
                             "Traceback (most recent call last):")