Spaces:
Sleeping
Sleeping
alessandro trinca tornidor
commited on
Commit
•
bbdd80f
1
Parent(s):
37d9063
[ci] handle also TypeErrors in create_folders_and_variables_if_not_exists.sh
Browse files
scripts/create_folders_and_variables_if_not_exists.py
CHANGED
@@ -41,11 +41,11 @@ if __name__ == '__main__':
|
|
41 |
create_folder_if_not_exists(folder_env_path)
|
42 |
print("========")
|
43 |
assert os.getenv(folder_env_ref) == folder_env_path
|
44 |
-
except json.JSONDecodeError as jde:
|
45 |
print(f"jde:{jde}.")
|
46 |
logging.error(f"jde:{jde}.")
|
47 |
print("double check your variables, e.g. for mispelling like 'FOLDER_MAP'...")
|
48 |
logging.info("double check your variables, e.g. for mispelling like 'FOLDER_MAP' instead than 'FOLDERS_MAP'...")
|
49 |
for k_env, v_env in dict(os.environ).items():
|
50 |
-
print(f"
|
51 |
-
logging.info(f"
|
|
|
41 |
create_folder_if_not_exists(folder_env_path)
|
42 |
print("========")
|
43 |
assert os.getenv(folder_env_ref) == folder_env_path
|
44 |
+
except (json.JSONDecodeError, TypeError) as jde:
|
45 |
print(f"jde:{jde}.")
|
46 |
logging.error(f"jde:{jde}.")
|
47 |
print("double check your variables, e.g. for mispelling like 'FOLDER_MAP'...")
|
48 |
logging.info("double check your variables, e.g. for mispelling like 'FOLDER_MAP' instead than 'FOLDERS_MAP'...")
|
49 |
for k_env, v_env in dict(os.environ).items():
|
50 |
+
print(f"{k_env}, v_env:{v_env}.")
|
51 |
+
logging.info(f"{k_env}, v_env:{v_env}.")
|