Skip to content

Commit

Permalink
address copilot comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdwhdw authored and daweihuang committed Dec 11, 2024
1 parent a9864f2 commit 6065944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host_modules/docker_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def run(self, image, command, kwargs):
if command:
return (
errno.EPERM,
"Only empty command is allowed to be managed by this service."
"Only empty string command is allowed to be managed by this service."
)

# Semgrep cannot detect codes for validating image and command.
Expand All @@ -197,4 +197,4 @@ def run(self, image, command, kwargs):
except docker.errors.ImageNotFound:
return errno.ENOENT, "Image {} not found.".format(image)
except Exception as e:
return 1, "Failed to run container {}: {}".format(image, str(e))
return 1, "Failed to run image {}: {}".format(image, str(e))

0 comments on commit 6065944

Please sign in to comment.