Skip to content

Commit

Permalink
file: update attributes for lsattr and chattr
Browse files Browse the repository at this point in the history
  • Loading branch information
aplanas committed Nov 28, 2018
1 parent 57674c3 commit 1be76ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions salt/modules/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def lsattr(path):
for line in result.splitlines():
if not line.startswith('lsattr: '):
vals = line.split(None, 1)
results[vals[1]] = re.findall(r"[acdijstuADST]", vals[0])
results[vals[1]] = re.findall(r"[aAcCdDeijPsStTu]", vals[0])

return results

Expand All @@ -587,8 +587,8 @@ def chattr(*files, **kwargs):
should be added or removed from files
attributes
One or more of the following characters: ``acdijstuADST``, representing
attributes to add to/remove from files
One or more of the following characters: ``aAcCdDeijPsStTu``,
representing attributes to add to/remove from files
version
a version number to assign to the file(s)
Expand All @@ -613,7 +613,7 @@ def chattr(*files, **kwargs):
raise SaltInvocationError(
"Need an operator: 'add' or 'remove' to modify attributes.")
if attributes is None:
raise SaltInvocationError("Need attributes: [AacDdijsTtSu]")
raise SaltInvocationError("Need attributes: [aAcCdDeijPsStTu]")

cmd = ['chattr']

Expand Down
2 changes: 1 addition & 1 deletion salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ def managed(name,
attrs
The attributes to have on this file, e.g. ``a``, ``i``. The attributes
can be any or a combination of the following characters:
``acdijstuADST``.
``aAcCdDeijPsStTu``.
.. note::
This option is **not** supported on Windows.
Expand Down
2 changes: 1 addition & 1 deletion salt/states/netconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def saved(name,
attrs
The attributes to have on this file, e.g. ``a``, ``i``. The attributes
can be any or a combination of the following characters:
``acdijstuADST``.
``aAcCdDeijPsStTu``.
.. note::
This option is **not** supported on Windows.
Expand Down

0 comments on commit 1be76ec

Please sign in to comment.