From 3d5f81972c859eefd8646396e593ec4691445b95 Mon Sep 17 00:00:00 2001 From: Shoji Imamura Date: Mon, 14 May 2018 16:45:06 +0900 Subject: [PATCH] [bugfix] fix of cant get true packet type on python3 --- README.md | 2 +- omron_envsensor/__init__.py | 2 +- omron_envsensor/util.py | 4 ++-- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1a3c3c8..53b6d1f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,6 @@ sudo pip3 install pygattlib ### 補遺2 インストール ```shell -sudo pip3 install https://github.com/isaaxug/omron_envsensor/archive/0.0.0.zip +sudo pip3 install https://github.com/isaaxug/omron_envsensor/archive/0.0.1.zip ``` diff --git a/omron_envsensor/__init__.py b/omron_envsensor/__init__.py index 411c996..f0a802a 100644 --- a/omron_envsensor/__init__.py +++ b/omron_envsensor/__init__.py @@ -2,7 +2,7 @@ """ from __future__ import absolute_import -__version__ = '0.0.0' +__version__ = '0.0.1' from logging import getLogger, NullHandler logger = getLogger('omron_envsensor') diff --git a/omron_envsensor/util.py b/omron_envsensor/util.py index bae0a5c..d0c7e2d 100644 --- a/omron_envsensor/util.py +++ b/omron_envsensor/util.py @@ -54,9 +54,9 @@ def get_companyid(pkt): # classify beacon type sent from the sensor def classify_beacon_packet(report): - if report["payload_binary"][29:31] in ['IM', u'IM']: + if report["payload_binary"][29:31] in ['IM', b'IM']: return "IM" - elif report["payload_binary"][29:31] in ['EP', u'EP']: + elif report["payload_binary"][29:31] in ['EP', b'EP']: return "EP" return "UNKNOWN" diff --git a/setup.py b/setup.py index c6c81f2..7d39257 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ name = "omron_envsensor", version = omron_envsensor.__version__, description = ("OMRON 2JCIE-BL01 SENSOR"), - packages = [""], + packages = ['pybluez', 'pygattlib'], classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3",