~benoit.pierre/bzrtools/shell_improvements

« back to all changes in this revision

Viewing changes to shell.py

  • Committer: Benoît Pierre
  • Date: 2009-08-02 13:35:17 UTC
  • Revision ID: benoit.pierre@gmail.com-20090802133517-mocr8zufiw59sc6q
Catch shlex.split ValueError exceptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        return self.exec_and_update_tree('reconfigure ' + line)
184
184
 
185
185
    def default(self, line):
186
 
        args = shlex.split(line)
 
186
        try:
 
187
            args = shlex.split(line)
 
188
        except ValueError, e:
 
189
            print 'ValueError:', e
 
190
            return
187
191
        alias_args = None
188
192
 
189
193
        commandname = args.pop(0)