Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrbriggs committed Oct 17, 2015
2 parents 74e0a27 + 2e0cbdc commit 83641c1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Version 4.1.7

* Merge patches from Ville S:
* https://github.com/jasonrbriggs/stomp.py/pull/56
* https://github.com/jasonrbriggs/stomp.py/pull/57


Version 4.1.6 - Aug 2015

* Generic exception catch on heartbeat send
* Change default connection to the 1.2 protocol
* Fix timeout (https://github.com/jasonrbriggs/stomp.py/issues/55)


Version 4.1.5 - Aug 2015
Expand Down
2 changes: 1 addition & 1 deletion stomp/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def on_send(self, frame):
"""
Add the heartbeat header to the frame when connecting.
"""
if frame.cmd == 'CONNECT' or frame.cmd == 'STOMP':
if frame.cmd == CMD_CONNECT or frame.cmd == CMD_STOMP:
if self.heartbeats != (0, 0):
frame.headers[HDR_HEARTBEAT] = '%s,%s' % self.heartbeats

Expand Down
4 changes: 2 additions & 2 deletions stomp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def commit(self, transaction=None, headers={}, **keyword_headers):
assert transaction is not None, "'transaction' is required"
headers = utils.merge_headers([headers, keyword_headers])
headers[HDR_TRANSACTION] = transaction
self.send_frame('COMMIT', headers)
self.send_frame(CMD_COMMIT, headers)

def connect(self, username=None, passcode=None, wait=False, headers={}, **keyword_headers):
cmd = CMD_CONNECT
Expand Down Expand Up @@ -155,7 +155,7 @@ def commit(self, transaction=None, headers={}, **keyword_headers):
assert transaction is not None, "'transaction' is required"
headers = utils.merge_headers([headers, keyword_headers])
headers[HDR_TRANSACTION] = transaction
self.send_frame('COMMIT', headers)
self.send_frame(CMD_COMMIT, headers)

def connect(self, username=None, passcode=None, wait=False, headers={}, **keyword_headers):
cmd = CMD_STOMP
Expand Down
2 changes: 1 addition & 1 deletion stomp/test/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_returns_true_when_localhost(self):
self.assertEquals(2, is_localhost(('192.168.1.92', 8000)))

def test_convert_frame_to_lines(self):
f = Frame('SEND', { 'header1' : 'value1'}, 'this is the body')
f = Frame('SEND', {'header1' : 'value1', 'headerNone': None}, 'this is the body')

lines = convert_frame_to_lines(f)

Expand Down
2 changes: 2 additions & 0 deletions stomp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def convert_frame_to_lines(frame):
lines.append(frame.cmd)
lines.append("\n")
for key, vals in sorted(frame.headers.items()):
if vals is None:
continue
if type(vals) != tuple:
vals = (vals,)
for val in vals:
Expand Down

0 comments on commit 83641c1

Please sign in to comment.