1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 10:04:17 +00:00
This commit is contained in:
deadc0de6
2021-04-29 15:27:22 +02:00
parent 3ca863c9dd
commit 2654458c6e
9 changed files with 70 additions and 48 deletions

View File

@@ -312,7 +312,8 @@ class CfgAggregator:
return self._get_long_key(path, existing_keys)
return self._get_short_key(path, existing_keys)
def _norm_key_elem(self, elem):
@classmethod
def _norm_key_elem(cls, elem):
"""normalize path element for sanity"""
elem = elem.lstrip('.')
elem = elem.replace(' ', '-')
@@ -369,7 +370,8 @@ class CfgAggregator:
self._load()
self.debug = olddebug
def _norm_path(self, path):
@classmethod
def _norm_path(cls, path):
if not path:
return path
path = os.path.expanduser(path)