Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Baba committed Jul 24, 2016
2 parents d406840 + d4a5072 commit 35c26c0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,21 @@ $ ./setup.py test

# Revision history

* 1.0.0
- Initial public release
* 1.0.1
- Fix an issue where echo back line can be included into the result string
- Fix an issue where CI test was failure because of unnecessary dependency on pypandoc

* 1.0.0
- Initial public release

* 0.1.1-0.1.3
- Fix resolve_modem_port()
- Fix resolve_modem_port()

* 0.1.0
- Remove modem_auto_connect()
- Add a new function to enable ACM, modem_enable_acm()
- Add a new function delete APN, apn_del()
- Add a new static function to resolve modem serial port
- Remove modem_auto_connect()
- Add a new function to enable ACM, modem_enable_acm()
- Add a new function delete APN, apn_del()
- Add a new static function to resolve modem serial port

* 0.0.1
- Initial beta release
9 changes: 6 additions & 3 deletions lib/candy_board_amt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,15 @@ def send_at(self, cmd):
print("[modem:OUT] => [%s]" % line)
self.serial.write(line)
time.sleep(0.1)
self.read_line() # echo back
result = ""
status = None
while not status:
while True:
line = self.read_line()
if line == "OK" or line == "ERROR":
if line is None:
break
elif line == cmd:
continue
elif line == "OK" or line == "ERROR":
status = line
elif line is None:
status = "UNKNOWN"
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

import os
import sys
import pypandoc
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

version = "1.0.0"
version = "1.0.1"

try:
import pypandoc
readme_txt = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
readme_txt = ""

class PyTest(TestCommand):
def finalize_options(self):
Expand All @@ -32,7 +37,7 @@ def run_tests(self):
url='http://github.com/CANDY-LINE/candy-board-amt',
download_url='https://github.com/CANDY-LINE/candy-board-amt/tarball/{0}'.format(version),
description='Base CANDY LINE boards service for AM Telecom Modules',
long_description=pypandoc.convert('README.md', 'rst'),
long_description=readme_txt,
packages=find_packages('lib'),
package_dir={'': 'lib'},
license='BSD3',
Expand Down
4 changes: 3 additions & 1 deletion tests/sock_server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
@pytest.fixture(scope='function')
def setup_sock_server(request):
serialport = SerialPortEmurator()
return candy_board_amt.SockServer('devel', \
server = candy_board_amt.SockServer('devel', \
{'apn': 'apn', 'user': 'apn_user', 'password': 'apn_password'}, \
'/var/run/candy-board-service.sock', \
serialport)
server.debug = True
return server

def test_perform_nok(setup_sock_server):
ret = setup_sock_server.perform({'category':'no-such-category', 'action':'no-such-action'})
Expand Down

0 comments on commit 35c26c0

Please sign in to comment.