diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-29 01:48:47 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-29 01:48:47 (GMT) |
commit | bed171011525daab22ea99575abd8c14751b8ea6 (patch) | |
tree | b4b0009cfbc70492db03298c3c3f2922ac4e2d8e /Lib/idlelib | |
parent | 47c2b607b8584a5c9e4bd46f53f12fa4fb772d5e (diff) | |
download | cpython-bed171011525daab22ea99575abd8c14751b8ea6.zip cpython-bed171011525daab22ea99575abd8c14751b8ea6.tar.gz cpython-bed171011525daab22ea99575abd8c14751b8ea6.tar.bz2 |
Fix more threading API related bugs: Thread.get_name() --> Thread.name.
Seen when setting RPCHandler.debugging=True
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/rpc.py | 4 | ||||
-rw-r--r-- | Lib/idlelib/run.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index d4af81d..5d5bcf7 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -106,7 +106,7 @@ class RPCServer(socketserver.TCPServer): erf = sys.__stderr__ print('\n' + '-'*40, file=erf) print('Unhandled server exception!', file=erf) - print('Thread: %s' % threading.current_thread().get_name(), file=erf) + print('Thread: %s' % threading.current_thread().name, file=erf) print('Client Address: ', client_address, file=erf) print('Request: ', repr(request), file=erf) traceback.print_exc(file=erf) @@ -149,7 +149,7 @@ class SocketIO(object): def debug(self, *args): if not self.debugging: return - s = self.location + " " + str(threading.current_thread().get_name()) + s = self.location + " " + str(threading.current_thread().name) for a in args: s = s + " " + str(a) print(s, file=sys.__stderr__) diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 20770b6..28b7bc0 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -230,7 +230,7 @@ class MyRPCServer(rpc.RPCServer): erf = sys.__stderr__ print('\n' + '-'*40, file=erf) print('Unhandled server exception!', file=erf) - print('Thread: %s' % threading.current_thread().get_name(), file=erf) + print('Thread: %s' % threading.current_thread().name, file=erf) print('Client Address: ', client_address, file=erf) print('Request: ', repr(request), file=erf) traceback.print_exc(file=erf) |