flv / cometd

Automatically exported from code.google.com/p/cometd
0 stars 0 forks source link

cometd.py KeyError in initHandshake #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start the default/example cometd.py server
2. Start the twisted-cometd-client.py
3. Watch it throw a KeyError-Exception

Expected output: Connecting to the server, subscribing to topics.

Observed output: KeyError being raised
  File ".../python2.5/site-packages/cometd.py", line 491, in initHandshake
   if message["id"] is not None:
  exceptions.KeyError: 'id'

With: cometd-twisted SVN Rev. 462, Python2.5, Ubuntu Linux Gutsy.

Could be fixed with checking message.has_key("id") before trying to access it.
Or the twisted-cometd-client.py is the culprit with not sending a "id" field.

Both should be fixed ;)

Original issue reported on code.google.com by jessicat...@gmail.com on 17 Jan 2008 at 12:27