File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22import configparser
3+ import os
34from enum import Enum
45from pathlib import Path
56from typing import Optional
67
7-
88JSON_SCHEMA_VERSION = '2.0.0'
99
1010# TODO fix this
1515DIR_NAME = ".safety"
1616
1717def get_system_dir () -> Path :
18- import sys
1918 import os
19+ import sys
2020 raw_dir = os .getenv ("SAFETY_SYSTEM_CONFIG_PATH" )
2121 app_data = os .environ .get ('ALLUSERSPROFILE' , None )
2222
@@ -98,7 +98,8 @@ def get_config_setting(name: str) -> Optional[str]:
9898 DATA_API_BASE_URL
9999]
100100
101- REQUEST_TIMEOUT = 30
101+ # Fetch the REQUEST_TIMEOUT from the environment variable, defaulting to 30 if not set
102+ REQUEST_TIMEOUT = int (os .getenv ("SAFETY_REQUEST_TIMEOUT" , 30 ))
102103
103104# Colors
104105YELLOW = 'yellow'
@@ -122,19 +123,19 @@ def get_config_setting(name: str) -> Optional[str]:
122123MSG_NO_AUTHD_CICD_PROD_STG_ORG = \
123124f"""
124125Login to get your API key
125-
126+
126127To log in: [link]{{LOGIN_URL}}[/link]
127-
128+
128129Read more at: [link]{ DOCS_API_KEY_URL } [/link]
129130"""
130131
131132MSG_NO_AUTHD_NOTE_CICD_PROD_STG_TPL = \
132133f"""
133134Login or register for a free account to get your API key
134-
135+
135136To log in: [link]{{LOGIN_URL}}[/link]
136137To register: [link]{{SIGNUP_URL}}[/link]
137-
138+
138139Read more at: [link]{ DOCS_API_KEY_URL } [/link]
139140"""
140141
You can’t perform that action at this time.
0 commit comments