summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-06 03:58:15 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-06 03:58:15 +0000
commite618d99bc7adb47b724aebf67ea85e59c520e10d (patch)
treed4edc38c44fae5bb60ae93f211f1c56e8ef1132e /ipalib/plugable.py
parent8865f516dfbffaee0da679c47aa2709ec8f5d80f (diff)
downloadfreeipa-e618d99bc7adb47b724aebf67ea85e59c520e10d.tar.gz
freeipa-e618d99bc7adb47b724aebf67ea85e59c520e10d.tar.xz
freeipa-e618d99bc7adb47b724aebf67ea85e59c520e10d.zip
57: to_cli() function no longer replaces '__' with '.'; from_cli() function no longer replaces '.' with '__'; updated unit tests
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 801ef7ab..01adc613 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -32,7 +32,7 @@ def to_cli(name):
Command Line Interface.
"""
assert isinstance(name, str)
- return name.replace('__', '.').replace('_', '-')
+ return name.replace('_', '-')
def from_cli(cli_name):
@@ -41,7 +41,7 @@ def from_cli(cli_name):
Python identifier.
"""
assert isinstance(cli_name, basestring)
- return cli_name.replace('-', '_').replace('.', '__')
+ return cli_name.replace('-', '_')
def check_identifier(name):
@@ -143,7 +143,7 @@ class Proxy(ReadOnly):
"""
if proxy_name is None:
proxy_name = obj.__class__.__name__
- assert isinstance(proxy_name, str)
+ check_identifier(proxy_name)
object.__setattr__(self, '_Proxy__obj', obj)
object.__setattr__(self, 'name', proxy_name)
if callable(obj):