Skip to content

Commit

Permalink
Merge pull request #53 from mokshaproject/version-comparison
Browse files Browse the repository at this point in the history
STOMP-1.2 can NACK, of course.
  • Loading branch information
ralphbean committed Mar 9, 2018
2 parents 1c2c923 + def7242 commit d640a7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moksha.hub/moksha/hub/stomp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

import logging

from distutils.version import LooseVersion

from moksha.common.lib.converters import asbool

try:
Expand Down Expand Up @@ -136,7 +138,7 @@ def dataReceived(self, data):
# Return, so as not to send an erroneous ack.
return

if stomper.STOMP_VERSION != '1.1':
if LooseVersion(stomper.STOMP_VERSION) < LooseVersion('1.1'):
log.error("Unable to NACK stomp %r" % stomper.STOMP_VERSION)
# Also, not sending an erroneous ack.
return
Expand Down

0 comments on commit d640a7c

Please sign in to comment.