diff --git a/catcli/catcli.py b/catcli/catcli.py index d5adf00..8d9d205 100755 --- a/catcli/catcli.py +++ b/catcli/catcli.py @@ -210,7 +210,7 @@ def cmd_edit(args, noder, catalog, top): if not attr: attr = '' new = edit(attr) - node.attr = noder.clean_storage_attr(new) + node.attr = noder.format_storage_attr(new) if catalog.save(top): Logger.info('Storage \"{}\" edited'.format(storage)) else: diff --git a/catcli/noder.py b/catcli/noder.py index 3b493ea..34bb52d 100644 --- a/catcli/noder.py +++ b/catcli/noder.py @@ -148,7 +148,10 @@ class Noder: '''format the storage attr for saving''' if not attr: return '' - return ', '.join(attr) + if type(attr) is list: + return ', '.join(attr) + attr = attr.rstrip() + return attr def set_hashing(self, val): '''hash files when indexing'''