Skip to content

Instantly share code, notes, and snippets.

@hobodave
Created January 8, 2013 04:44
Show Gist options
  • Save hobodave/4481226 to your computer and use it in GitHub Desktop.
Save hobodave/4481226 to your computer and use it in GitHub Desktop.
class Stomp(object):
def __init__(self):
self._transport = None
def connect(self):
try: # preserve existing connection
self._transport
except StompConnectionError:
pass
else:
raise StompConnectionError('Already connected to %s' % self._transport)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment