Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoshi committed Apr 20, 2015
2 parents 844ae60 + 9f2295a commit e9a149a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 43 deletions.
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ load-plugins=

[MESSAGES CONTROL]
disable=
superfluous-parens,
invalid-name,
no-member
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1.5'
version = '0.1.6'
# The full version, including alpha/beta/rc tags.
release = '0.1.5'
release = '0.1.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 0 additions & 5 deletions rancidcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from subprocess import Popen
from subprocess import PIPE
import shlex
import os
import stat

Expand Down Expand Up @@ -41,10 +40,6 @@ def generate_cmd(self, command):
self.login, self.timeout, self.user,
self.password, command, self.address)

def cmd_token(self, command):
"""Split one line command."""
return shlex.split(command)

def decode_bytes(self, byte_data):
"""Change string with encoding setting."""
return byte_data.decode(self.encoding)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def run_tests(self):

setup(
name="rancidcmd",
version="0.1.5",
description='Rancid Command Wrapper.',
version="0.1.6",
description='RANCID Command Wrapper.',
long_description=README,
author='Toshikatsu Murakoshi',
author_email='mtoshi.g@gmail.com',
Expand Down
33 changes: 0 additions & 33 deletions tests/test_rancidcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,39 +61,6 @@ def test_init(self):
self.assertEqual(self.obj3.timeout, 20)
self.assertEqual(self.obj3.encoding, 'utf-8')

def test_cmd_token(self):
"""Check command line split."""
cmd1 = ['clogin',
'-t',
'10',
'-u',
'rancid',
'-p',
'password',
'-e',
'enable_password',
'-c',
'"show version"',
'192.168.1.1']

cmd2 = ['clogin',
'-t',
'10',
'-u',
'rancid',
'-p',
'password',
'-e',
'enable_password',
'-c',
'show version',
'192.168.1.1']

cmd_str = " ".join(cmd1)

cmd_args = self.obj1.cmd_token(cmd_str)
self.assertEqual(cmd_args, cmd2)

def _test_generate_cmd(self):
"""Check command format."""
cmd = 'show version'
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
py33,
py34,
pypy,
pylint,
docs

[pep257]
Expand All @@ -25,7 +26,7 @@ commands=
deps=
pylint
commands =
pylint pytmpl --rcfile={toxinidir}/.pylintrc
pylint rancidcmd.py --rcfile={toxinidir}/.pylintrc

[testenv:docs]
deps=
Expand Down

0 comments on commit e9a149a

Please sign in to comment.