Skip to content

Commit

Permalink
fix double \n in SessionInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
kutu committed Dec 6, 2017
1 parent c8b1b3c commit 19d8744
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions irsdk.py
Expand Up @@ -14,7 +14,7 @@
except ImportError:
from yaml import Loader as YamlLoader

VERSION = '1.1.10'
VERSION = '1.1.11'

SIM_STATUS_URL = 'http://127.0.0.1:32034/get_sim_status?object=simStatus'

Expand Down Expand Up @@ -490,7 +490,9 @@ def _get_session_info(self, key):
# search section by key
self._shared_mem.seek(0)
start = self._shared_mem.find(('\n%s:\n' % key).encode(YAML_CODE_PAGE), start, end)
end = self._shared_mem.find(b'\n\n', start, end)
match_end = re.compile(b'\n\w').search(self._shared_mem, start + 1, end)
if match_end:
end = match_end.start()
data_binary = self._shared_mem[start:end]

# section not found
Expand Down

0 comments on commit 19d8744

Please sign in to comment.