When /etc/cgconfig.d/ exists, a UnicodeDecodeError is
thrown because the Unicode error string cannot be
properly decoded by Run.run(). Catch this error as it's
not an error in this case.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
config.container.run(cmd, shell_bool=True)
else:
Run.run(cmd, shell_bool=True)
- except RunError as re:
- # check the errno to ensure the directory exists rather
- # than receiving a different error
- if re.ret == 1 and \
- 'File exists' in re.stderr:
- pass
- else:
- raise re
+ except UnicodeDecodeError as ude:
+ # A unicode error is thrown when the directory already exists
+ pass
cmd2 = list()