Skip to content

Commit

Permalink
Move constants to common constants
Browse files Browse the repository at this point in the history
  • Loading branch information
amshamah419 committed Apr 12, 2020
1 parent 547f956 commit f5a8206
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions demisto_sdk/commands/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def found_hidden_param(parameter_name):
BETA_INTEGRATIONS_DIR = 'Beta_Integrations'
PACKS_DIR = 'Packs'
TOOLS_DIR = 'Tools'
RELEASE_NOTES_DIR = 'ReleaseNotes'

DEFAULT_IMAGE_PREFIX = 'data:image/png;base64,'
DEFAULT_IMAGE_BASE64 = 'iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACYVBMVEVHcEwAT4UAT4UAT4YAf/8A//8AT4UAf78AT4U' \
Expand Down
3 changes: 2 additions & 1 deletion demisto_sdk/commands/create_artifacts/content_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
INTEGRATIONS_DIR,
LAYOUTS_DIR, MISC_DIR,
PACKS_DIR, PLAYBOOKS_DIR,
RELEASE_NOTES_DIR,
REPORTS_DIR, SCRIPTS_DIR,
TEST_PLAYBOOKS_DIR,
TOOLS_DIR, WIDGETS_DIR)
Expand Down Expand Up @@ -256,7 +257,7 @@ def copy_dir_md(self, dir_path, bundle):
scan_files = glob.glob(os.path.join(dir_path, '*.md'))
for path in scan_files:
new_path = os.path.basename(path)
if dir_name == 'ReleaseNotes':
if dir_name == RELEASE_NOTES_DIR:
if os.path.isfile(os.path.join(bundle, new_path)):
raise NameError(
f'Failed while trying to create {os.path.join(bundle, new_path)}. File already exists.'
Expand Down

0 comments on commit f5a8206

Please sign in to comment.