Skip to content

Commit

Permalink
Workspace: Simplify container_id regex in dojofs
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson committed Oct 4, 2024
1 parent e0e66f6 commit 5b4ee1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dojofs/dojofs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_container_context():
import pathlib
import re

container_re = re.compile(r"/docker/containers/([0-9a-f]+)/hostname")
container_re = re.compile(r"/containers/([0-9a-f]+)/hostname")
mount_info = pathlib.Path(f"/proc/{pid}/mountinfo").read_text()
container_id = match.group(1) if (match := container_re.search(mount_info)) else None
if not container_id:
Expand Down

0 comments on commit 5b4ee1d

Please sign in to comment.