File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -77,18 +77,23 @@ def version_check_execution_condition(
77
77
:param package_integration: package integration of the client
78
78
"""
79
79
if (
80
- os .getenv ("NM_VERSION_CHECK" ) is None
81
- or os .getenv ("NM_VERSION_CHECK" ).lower ().strip () ! = "false"
80
+ os .getenv ("NM_VERSION_CHECK" ) is not None
81
+ and os .getenv ("NM_VERSION_CHECK" ).lower ().strip () = = "false"
82
82
):
83
+ LOGGER .info ("Skipping Neural Magic's latest package version check" )
84
+ return
85
+
86
+ try :
83
87
package_version_check_request (
84
88
package_name = package_name ,
85
89
package_integration = package_integration ,
86
90
package_version = package_version ,
87
91
)
88
- else :
89
- LOGGER .info (
90
- "Skipping Neural Magic's internal code exection: "
91
- "latest package version check"
92
+ except Exception as err :
93
+ LOGGER .warning (
94
+ "Neural Magic's latest package version check raised an exception. "
95
+ "To turn off set the following in the environment NM_VERSION_CHECK=false "
96
+ f"Exception: { err } "
92
97
)
93
98
94
99
You can’t perform that action at this time.
0 commit comments