Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions plugins/module_utils/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,25 +496,6 @@ def uss_file_tag(self, file_path):
except Exception:
return None

def uss_tag_encoding(self, file_path, tag):
"""Tag the file/directory specified with the given code set.
If `file_path` is a directory, all of the files and subdirectories will
be tagged recursively.

Arguments:
file_path {str} -- Absolute file path to tag.
tag {str} -- Code set to tag the file/directory.

Raises:
TaggingError: When the chtag command fails.
"""
is_dir = os.path.isdir(file_path)

tag_cmd = "chtag -{0}c {1} {2}".format("R" if is_dir else "t", tag, file_path)
rc, out, err = self.module.run_command(tag_cmd)
if rc != 0:
raise TaggingError(file_path, tag, rc, out, err)


class EncodeError(Exception):
def __init__(self, message):
Expand Down