Skip to content

Commit

Permalink
m1n1.hv: Add ctx shell alias for context.
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Jul 30, 2022
1 parent 72cce09 commit 4f0be4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxyclient/m1n1/hv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def _update_shell_locals(self):
if callable(a):
self.shell_locals[attr] = getattr(self, attr)

self.shell_locals["ctx"] = self.context

def log(self, s, *args, show_cpu=True, **kwargs):
if self.ctx is not None and show_cpu:
print(f"[cpu{self.ctx.cpu_id}] " + s, *args, **kwargs)
Expand Down

0 comments on commit 4f0be4a

Please sign in to comment.