|
15 | 15 | # limitations under the License. |
16 | 16 |
|
17 | 17 | import logging |
18 | | -import os |
19 | 18 | import subprocess |
20 | 19 | from pathlib import Path |
21 | 20 | from typing import Any, Dict |
@@ -81,11 +80,6 @@ def install(self) -> InstallStatusResult: |
81 | 80 | if install_status.success: |
82 | 81 | return InstallStatusResult(success=True, message="NeMo-Launcher is already installed.") |
83 | 82 |
|
84 | | - try: |
85 | | - self._check_install_path_access() |
86 | | - except PermissionError as e: |
87 | | - return InstallStatusResult(success=False, message=str(e)) |
88 | | - |
89 | 83 | subdir_path = self.system.install_path / self.SUBDIR_PATH |
90 | 84 | subdir_path.mkdir(parents=True, exist_ok=True) |
91 | 85 |
|
@@ -119,19 +113,6 @@ def uninstall(self) -> InstallStatusResult: |
119 | 113 |
|
120 | 114 | return InstallStatusResult(success=True) |
121 | 115 |
|
122 | | - def _check_install_path_access(self): |
123 | | - """ |
124 | | - Check if the install path exists and if there is permission to create a directory or file in the path. |
125 | | -
|
126 | | - Raises |
127 | | - PermissionError: If the install path does not exist or if there is no permission to create directories and |
128 | | - files. |
129 | | - """ |
130 | | - if not self.system.install_path.exists(): |
131 | | - raise PermissionError(f"Install path {self.system.install_path} does not exist.") |
132 | | - if not self.system.install_path.is_dir() or not os.access(self.system.install_path, os.W_OK): |
133 | | - raise PermissionError(f"No permission to write in install path {self.system.install_path}.") |
134 | | - |
135 | 116 | def _clone_repository(self, subdir_path: Path) -> None: |
136 | 117 | """ |
137 | 118 | Clones NeMo-Launcher repository into specified path if it does not already exist. |
|
0 commit comments