Permalink
Browse files

Merge branch 'master' of github.com:pcmanus/ccm

  • Loading branch information...
2 parents 708a610 + 10462cf commit 1f9beffcba6b0585148fdb3104461e5c11c63c5e @pcmanus committed Sep 11, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 cmds/node_cmds.py
View
8 cmds/node_cmds.py
@@ -65,7 +65,7 @@ def run(self):
class NodeShowlogCmd(Cmd):
def description(self):
- return "Show the log of node name (run 'less' on its system.log)"
+ return "Show the log of node name (runs your $PAGER on its system.log)"
def get_parser(self):
usage = "usage: ccm node_name showlog [options]"
@@ -76,10 +76,8 @@ def validate(self, parser, options, args):
def run(self):
log = os.path.join(self.node.get_path(), 'logs', 'system.log')
- try:
- subprocess.call(['less', log])
- except KeyboardInterrupt:
- pass
+ pager = os.environ.get('PAGER', 'less')
+ os.execvp(pager, (pager, log))
class NodeSetlogCmd(Cmd):
def description(self):

0 comments on commit 1f9beff

Please sign in to comment.