Skip to content

Commit

Permalink
Update pubsub.py
Browse files Browse the repository at this point in the history
Fix issue with pubsub for Robert
  • Loading branch information
craig8 authored Aug 11, 2020
1 parent f17cb78 commit d3ecfff
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions volttron/platform/vip/agent/subsystems/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,13 @@ def _process_incoming_message(self, message):
del self._pubsubwithrpc
response = message.args[1]
import struct
if len(response) == 4: #integer
response = struct.unpack('I', response.encode('utf-8'))
response = response[0]
elif len(response) == 1: #bool
response = struct.unpack('?', response.encode('utf-8'))
response = response[0]
if not isinstance(response, int):
if len(response) == 4: #integer
response = struct.unpack('I', response.encode('utf-8'))
response = response[0]
elif len(response) == 1: #bool
response = struct.unpack('?', response.encode('utf-8'))
response = response[0]
if result:
result.set(response)

Expand Down

0 comments on commit d3ecfff

Please sign in to comment.