From: JINMEI Tatuya Date: Thu, 27 Sep 2012 22:08:51 +0000 (-0700) Subject: [2254] trivial editorial fix X-Git-Tag: trac2402_base~83^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da0b581e22f7a10931767f4d535cfda1554cc525;p=thirdparty%2Fkea.git [2254] trivial editorial fix --- diff --git a/src/bin/bindctl/bindcmd.py b/src/bin/bindctl/bindcmd.py index 9e7b1e1511..e798a41c12 100644 --- a/src/bin/bindctl/bindcmd.py +++ b/src/bin/bindctl/bindcmd.py @@ -496,7 +496,8 @@ class BindCmdInterpreter(Cmd): if self._cmd_has_identifier_param(cmd): # For tab-completion of identifiers, replace hardcoded # hints with hints derived from the config data - id_text = self.location + "/" + cur_line.rpartition(" ")[2] + id_text = self.location + "/" +\ + cur_line.rpartition(" ")[2] hints = self._get_identifier_startswith(id_text) except CmdModuleNameFormatError: diff --git a/src/bin/bindctl/tests/bindctl_test.py b/src/bin/bindctl/tests/bindctl_test.py index 3364211d3d..1b2aae6325 100644 --- a/src/bin/bindctl/tests/bindctl_test.py +++ b/src/bin/bindctl/tests/bindctl_test.py @@ -420,15 +420,15 @@ class TestConfigCommands(unittest.TestCase): sys.stdout = self.stdout_backup def test_cmd_has_identifier_param(self): - module = ModuleInfo(name = "test_module") + module = ModuleInfo(name="test_module") - cmd = CommandInfo(name = "command_with_identifier") - param = ParamInfo(name = bindcmd.IDENTIFIER_PARAM) + cmd = CommandInfo(name="command_with_identifier") + param = ParamInfo(name=bindcmd.IDENTIFIER_PARAM) cmd.add_param(param) module.add_command(cmd) - cmd = CommandInfo(name = "command_without_identifier") - param = ParamInfo(name = "some_argument") + cmd = CommandInfo(name="command_without_identifier") + param = ParamInfo(name="some_argument") cmd.add_param(param) module.add_command(cmd) @@ -445,7 +445,7 @@ class TestConfigCommands(unittest.TestCase): def test_get_identifier_startswith(self): hints = self.tool._get_identifier_startswith("/") - self.assertEqual([ 'foo/an_int', 'foo/a_list'], hints) + self.assertEqual(['foo/an_int', 'foo/a_list'], hints) hints = self.tool._get_identifier_startswith("/foo/an") self.assertEqual(['foo/an_int'], hints)