Skip to content

Commit 213015b

Browse files
committed
refactor: remove redundant Linux dependency installation checks and improve import handling
1 parent ce5ed61 commit 213015b

2 files changed

Lines changed: 2 additions & 19 deletions

File tree

node_cli.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,21 +1202,6 @@ async def command_line_args() -> Path | None:
12021202
else:
12031203
sys.exit(1)
12041204

1205-
# Handle Linux desktop automation dependency installation
1206-
if install_linux_deps:
1207-
install_linux_inspector_deps()
1208-
sys.exit(0)
1209-
1210-
# Handle listing available apps
1211-
if list_apps:
1212-
list_available_apps()
1213-
sys.exit(0)
1214-
1215-
# Handle UI dump generation
1216-
if dump_ui:
1217-
generate_ui_dump(dump_ui)
1218-
sys.exit(0)
1219-
12201205
# Update chrome extension download settings if specified
12211206
if chrome_fetch is not None:
12221207
os.environ["CHROME_DAYS_BEFORE_FETCH"] = str(chrome_fetch)

server/linux.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
from Framework.Utilities import ConfigModule, CommonUtil
1111

12-
try:
13-
from Framework.Built_In_Automation.Desktop.Linux import BuiltInFunctions
14-
except ImportError:
15-
BuiltInFunctions = None
1612

1713
router = APIRouter(prefix="/linux", tags=["linux"])
1814

@@ -29,6 +25,7 @@ class InspectorResponse(BaseModel):
2925
@router.get("/inspect")
3026
def inspect(app_name: str | None = None):
3127
"""Get the Linux UI DOM and screenshot."""
28+
from Framework.Built_In_Automation.Desktop.Linux import BuiltInFunctions
3229
if BuiltInFunctions is None:
3330
return InspectorResponse(status="error", error="Linux automation module not available")
3431

@@ -72,6 +69,7 @@ def inspect(app_name: str | None = None):
7269

7370
async def upload_linux_ui_dump():
7471
"""Continuously upload Linux UI dump if changed."""
72+
from Framework.Built_In_Automation.Desktop.Linux import BuiltInFunctions
7573
if BuiltInFunctions is None:
7674
return
7775

0 commit comments

Comments
 (0)