Skip to content

Commit 8fb7a04

Browse files
authored
Merge pull request #3639 from eaidova/ea/fix_paths_is_none
omz converter fix for case when no paths
2 parents 063f49d + 95b4977 commit 8fb7a04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/model_tools/src/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def __init__(self, paths):
4646

4747
def __enter__(self):
4848
self._original_path = copy.deepcopy(sys.path)
49-
sys.path = self._preprended_paths + sys.path
49+
if self._preprended_paths is not None:
50+
sys.path = self._preprended_paths + sys.path
5051

5152
def __exit__(self, type, value, traceback):
5253
if self._original_path is not None:

0 commit comments

Comments
 (0)