~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/common/chat.py

  • Committer: wagrant
  • Date: 2008-08-15 10:08:07 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1020
common.chat.chat: Unbreak messages longer than 1KiB. Please, please
                  never ever ever use unconditional excepts, or you
                  hide errors like this (an undefined local).

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    while blk:
121
121
        buf.write(blk)
122
122
        try:
123
 
            blk = conn.recv(1024, socket.MSG_DONTWAIT)
124
 
        except:
 
123
            blk = sok.recv(1024, socket.MSG_DONTWAIT)
 
124
        except socket.error, e:
 
125
            if e[0] != 11:
 
126
                raise
125
127
            # Exception thrown if it WOULD block (but we
126
128
            # told it not to wait) - ie. we are done
127
129
            blk = None