Update build.py - #11
Conversation
Signed-off-by: David Wertenteil <dwertent@armosec.io>
Signed-off-by: David Wertenteil <dwertent@armosec.io>
Signed-off-by: David Wertenteil <dwertent@armosec.io>
|
Preparing review... |
PR Analysis
PR Feedback
How to use
|
|
/improve |
|
|
||
| # Create build directory | ||
| # Create the build directory | ||
| build_dir = get_build_dir() |
There was a problem hiding this comment.
Suggestion: Add error handling for the get_build_dir() function
| build_dir = get_build_dir() | |
| try: | |
| build_dir = get_build_dir() | |
| except Exception as e: | |
| print(f'Error getting build directory: {e}') |
| # Create the build directory | ||
| build_dir = get_build_dir() | ||
|
|
||
| ks_file = os.path.join(build_dir, package_name) |
There was a problem hiding this comment.
Suggestion: Use os.path.join() for concatenating file paths
| ks_file = os.path.join(build_dir, package_name) | |
| ks_file = os.path.join(build_dir, package_name) |
| @@ -47,7 +47,7 @@ def main(): | |||
| client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" | |||
There was a problem hiding this comment.
Suggestion: Remove unused variable client_var
| client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" |
| @@ -47,7 +47,7 @@ def main(): | |||
| client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" | |||
| client_name = os.getenv("CLIENT") | |||
There was a problem hiding this comment.
Suggestion: Remove unused variable client_name
| client_name = os.getenv("CLIENT") |
c150614 to
addd66b
Compare
Overview