From da7ac486b800e9e71e83261ef3aac6731ad5c7bb Mon Sep 17 00:00:00 2001 From: xichen1 Date: Fri, 30 Jun 2023 00:31:09 -0600 Subject: [PATCH] Fix make command error Fixed the nested dependency version issue. Fixed the code style issues found by Flake8. Signed-off-by: xichen1 --- src/api-engine/api/lib/agent/handler.py | 3 ++- src/api-engine/api/routes/node/views.py | 4 ++-- src/dashboard/package.json | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/api-engine/api/lib/agent/handler.py b/src/api-engine/api/lib/agent/handler.py index f7e346f0d..ccab00e23 100644 --- a/src/api-engine/api/lib/agent/handler.py +++ b/src/api-engine/api/lib/agent/handler.py @@ -71,4 +71,5 @@ def get(self): try: return self._agent.get() except Exception as e: - return False \ No newline at end of file + LOG.error(e) + return False diff --git a/src/api-engine/api/routes/node/views.py b/src/api-engine/api/routes/node/views.py index 728e04609..7042865a4 100644 --- a/src/api-engine/api/routes/node/views.py +++ b/src/api-engine/api/routes/node/views.py @@ -574,11 +574,11 @@ def destroy(self, request, pk=None): LOG.info("Retry to stop/delete container %d time(s).", i + 1) try: response = agent.stop() - if response != True: + if response is not True: LOG.error("Failed when agent stops/deletes container: %s", response) continue response = agent.delete() - if response != True: + if response is not True: LOG.error("Failed when agent stops/deletes container: %s", response) continue res = True diff --git a/src/dashboard/package.json b/src/dashboard/package.json index fdf3560c1..b6fa1a1c7 100755 --- a/src/dashboard/package.json +++ b/src/dashboard/package.json @@ -141,5 +141,8 @@ "src/**/*.less", "config/**/*.js*", "scripts/**/*.js" - ] + ], + "resolutions": { + "mockjs/commander": "^8.2.0" + } }