# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+import ssl
+
import os
import logging
the path is a directory
:return:
"""
- if os.path.exists(file_path):
- if os.path.isdir(file_path):
+ expanded_path = os.path.expanduser(file_path)
+ if os.path.exists(expanded_path):
+ if os.path.isdir(expanded_path):
return False
- return os.path.isfile(file_path)
+ return os.path.isfile(expanded_path)
return False
proxy_handler = urllib.ProxyHandler({})
opener = urllib.build_opener(proxy_handler)
urllib.install_opener(opener)
- return urllib.urlopen(url)
+ context = ssl._create_unverified_context()
+ return urllib.urlopen(url, context=context)
def read_yaml(config_file_path):