1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 19:30:40 +00:00

fix chmod install

This commit is contained in:
deadc0de6
2020-11-09 21:56:13 +01:00
parent 73bbfeef04
commit 1f61699ca4
2 changed files with 9 additions and 8 deletions

View File

@@ -342,7 +342,7 @@ class CfgYaml:
if chmod:
lnkval = df_dict.get(self.key_dotfile_link, None)
if lnkval != self.lnk_children:
df_dict[self.key_dotfile_chmod] = format(chmod, 'o')
df_dict[self.key_dotfile_chmod] = str(format(chmod, 'o'))
# add to global dict
self._yaml_dict[self.key_dotfiles][key] = df_dict
@@ -639,7 +639,7 @@ class CfgYaml:
v[self.key_dotfile_template] = val
# validate value of chmod if defined
if self.key_dotfile_chmod in v:
val = v[self.key_dotfile_chmod]
val = str(v[self.key_dotfile_chmod])
if len(val) < 3:
err = 'bad format for chmod: {}'.format(val)
self._log.err(err)
@@ -661,6 +661,7 @@ class CfgYaml:
err = 'incompatible use of chmod and link_children'
self._log.err(err)
raise YamlException('config content error: {}'.format(err))
v[self.key_dotfile_chmod] = val
return new