From 3fe13d5945df224643374da477f68e04d4f443e5 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 8 Aug 2008 21:46:23 +0000 Subject: 87: Moved to_cli(), from_cli() functions from plugable.py into new cli.py file; moved corresponding unit tests into new test_cli.py file --- ipalib/plugable.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'ipalib/plugable.py') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 0a6a0caa..ecbd5855 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -26,24 +26,6 @@ import inspect import errors -def to_cli(name): - """ - Takes a Python identifier and transforms it into form suitable for the - Command Line Interface. - """ - assert isinstance(name, str) - return name.replace('_', '-') - - -def from_cli(cli_name): - """ - Takes a string from the Command Line Interface and transforms it into a - Python identifier. - """ - assert isinstance(cli_name, basestring) - return cli_name.replace('-', '_') - - def check_identifier(name): """ Raises errors.NameSpaceError if `name` is not a valid Python identifier -- cgit