Skip to content

Commit

Permalink
Merge pull request #8828 from vavuthu/create_data_dir__if_doesn't_exists
Browse files Browse the repository at this point in the history
creata data directory for downloading mcg-cli
  • Loading branch information
vavuthu authored Nov 14, 2023
2 parents e3343af + ea93d73 commit 9690fcf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ocs_ci/ocs/resources/mcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from ocs_ci.utility import templating, version
from ocs_ci.utility.retry import retry
from ocs_ci.utility.utils import (
create_directory_path,
get_attr_chain,
get_ocs_build_number,
exec_cmd,
Expand Down Expand Up @@ -943,6 +944,10 @@ def retrieve_noobaa_cli_binary(self):

pull_secret_path = os.path.join(constants.DATA_DIR, "pull-secret")

# create DATA_DIR if it doesn't exist
if not os.path.exists(constants.DATA_DIR):
create_directory_path(constants.DATA_DIR)

if not os.path.isfile(pull_secret_path):
logger.info(
f"Extracting pull-secret and placing it under {pull_secret_path}"
Expand Down

0 comments on commit 9690fcf

Please sign in to comment.