Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: tools/cr/cr/commands/shell.py

Issue 142933004: [cr tool] Make context implicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cr/cr/commands/select.py ('k') | tools/cr/cr/commands/sync.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cr/cr/commands/shell.py
diff --git a/tools/cr/cr/commands/shell.py b/tools/cr/cr/commands/shell.py
index 452ebb746064d91641b13ed4ce2c8fcf7c686b83..2cd338deb5e728f261defd27a2e6bf5a5c6ce1a6 100644
--- a/tools/cr/cr/commands/shell.py
+++ b/tools/cr/cr/commands/shell.py
@@ -35,9 +35,9 @@ class ShellCommand(cr.Command):
self.ConsumeArgs(parser, 'the shell')
return parser
- def Run(self, context):
- if context.remains:
- cr.Host.Shell(context, *context.remains)
+ def Run(self):
+ if cr.context.remains:
+ cr.Host.Shell(*cr.context.remains)
return
# If we get here, we are trying to launch an interactive shell
shell = os.environ.get('SHELL', None)
@@ -48,6 +48,6 @@ class ShellCommand(cr.Command):
with tempfile.NamedTemporaryFile() as rcfile:
rcfile.write('source ~/.bashrc\nPS1="'+ps1+'"')
rcfile.flush()
- cr.Host.Execute(context, shell, '--rcfile', rcfile.name)
+ cr.Host.Execute(shell, '--rcfile', rcfile.name)
else:
- cr.Host.Execute(context, shell)
+ cr.Host.Execute(shell)
« no previous file with comments | « tools/cr/cr/commands/select.py ('k') | tools/cr/cr/commands/sync.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698