Fixes X2GO client path lookup for correct argument type#166
Closed
aschumann-virtualcable wants to merge 1 commit intov4.0from
Closed
Fixes X2GO client path lookup for correct argument type#166aschumann-virtualcable wants to merge 1 commit intov4.0from
aschumann-virtualcable wants to merge 1 commit intov4.0from
Conversation
Changes the lookup for the X2GO client executable to pass a list of paths, ensuring compatibility with the expected argument type and preventing runtime errors if the path is not found. Updates signature to reflect the code adjustment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes a small but important fix to how the
findAppfunction is called in the Windows X2GO tunnel script. Instead of passing a string for the search path, it now passes a list, which matches the expected input for the function. The script's signature file has also been updated accordingly.Bug fix:
findAppcall intunnel.pyto pass a list of paths instead of a single string, ensuring compatibility with the function's expected argument type.Maintenance:
tunnel.py.signatureto reflect the code change.[Copilot is generating a summary...]Ç
Explains:
Reason: The old findApp signature was:
def searchApplication(applicationName, extraPath=None):
searchPath = os.environ['PATH'].split(os.pathsep)
if extraPath is not None:
searchPath += list(extraPath)
list(extraPath) behavior:
list([x2goPath]) → [x2goPath] ✓ (integer path)
list(x2goPath) → ['C',':','\','P','r',...] ✗ (iterates string character by character)
That's why the script passes [x2goPath] — designed for the old signature.
New version in client/src/uds/tools.py:110:
def search_application(application_name: string, extra_path: writing.Optional[string] = None):
if extra_path:
searchPath.append(extra_path)
Takes string directly. Deployed client still uses old version → script must continue passing list for compatibility. Comment in client/src/uds/tools.py:278-279 confirms: aliases maintain compatibility with older scripts until version 3.x is no longer supported.