~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf.py

  • Committer: Aaron Bentley
  • Date: 2007-12-18 01:30:03 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20071218013003-7par2kac2nry20n6
Clean error when 'shelf show' invoked with no patches on shelf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    def display(self, patch=None):
61
61
        if patch is None:
62
62
            path = self.last_patch()
 
63
            if path is None:
 
64
                raise CommandError("No patches on shelf.")
63
65
        else:
64
66
            path = self.__path_from_user(patch)
65
67
        sys.stdout.write(open(path).read())