diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2018-08-02 21:20:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 21:20:14 +0200 |
commit | 082d807007521690b2b2f5ed2dcfcb44cea1a479 (patch) | |
tree | 44acb6c23b3e0c7acc5ec6ce5549cf8230e1c221 | |
parent | Merge pull request #2737 from wwitzel3/release_3.3.0 (diff) | |
parent | set_stats fails in callback plugin on isolated node #2123 (diff) | |
download | awx-082d807007521690b2b2f5ed2dcfcb44cea1a479.tar.xz awx-082d807007521690b2b2f5ed2dcfcb44cea1a479.zip |
Merge pull request #2747 from ryanpetrello/isolated-set-stat
set_stats fails in callback plugin on isolated node #2123
-rw-r--r-- | awx/lib/awx_display_callback/module.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/awx/lib/awx_display_callback/module.py b/awx/lib/awx_display_callback/module.py index e6895d5c89..4f32fed305 100644 --- a/awx/lib/awx_display_callback/module.py +++ b/awx/lib/awx_display_callback/module.py @@ -308,7 +308,8 @@ class BaseCallbackModule(CallbackBase): if custom_artifact_data: # create the directory for custom stats artifacts to live in (if it doesn't exist) custom_artifacts_dir = os.path.join(os.getenv('AWX_PRIVATE_DATA_DIR'), 'artifacts') - os.makedirs(custom_artifacts_dir, mode=stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR) + if not os.path.isdir(custom_artifacts_dir): + os.makedirs(custom_artifacts_dir, mode=stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR) custom_artifacts_path = os.path.join(custom_artifacts_dir, 'custom') with codecs.open(custom_artifacts_path, 'w', encoding='utf-8') as f: |