Conversation
Signed-off-by: Hemil Desai <hemild@nvidia.com>
terrykong
left a comment
There was a problem hiding this comment.
generally lgtm. but out of curiosity, would the code be more succinct if you used rich instead of manually doing the ansi color codes?
| ) | ||
| if result.returncode == 0 and result.stdout.strip(): | ||
| return result.stdout.strip() | ||
| except Exception: |
Check notice
Code scanning / CodeQL
Empty except Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the issue, the except Exception: block should log the exception using the existing print_error function. This ensures that any errors encountered during the execution of the subprocess.run command are visible to the user, aiding in debugging and transparency. The fallback behavior (return "default") can remain unchanged, as it provides a reasonable default in case of failure.
Steps to implement the fix:
- Modify the
except Exception:block to log the exception usingprint_error. - Include the exception message in the log for better debugging.
- Ensure the fallback behavior (
return "default") remains intact.
| @@ -62,4 +62,4 @@ | ||
| return result.stdout.strip() | ||
| except Exception: | ||
| pass | ||
| except Exception as e: | ||
| print_error(f"Failed to retrieve default namespace: {e}") | ||
|
|
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
|
This PR was closed because it has been inactive for 7 days since being marked as stale. |
Run using
kuberay-rbacafter installing nemo-run.Start with
kuberay-rbac --help