Skip to content

Commit

Permalink
A slightly cleaner way to make the messages dict
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@13031 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
  • Loading branch information
spiv committed Feb 27, 2005
1 parent e97731c commit 28819b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions twisted/conch/ssh/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,7 @@ def buffer_dump(b, title = None):
DISCONNECT_ILLEGAL_USER_NAME = 15

messages = {}
import transport
for v in dir(transport):
if v[: 4] == 'MSG_':
messages[getattr(transport, v)] = v # doesn't handle doubles
for name, value in globals().items():
if name.startswith('MSG_'):
messages[value] = name

0 comments on commit 28819b2

Please sign in to comment.