~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-11 01:12:40 UTC
  • mfrom: (3999.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090211011240-gv0zdxmwomt3ndtn
Improve shelf documentation & fix backtrace (Daniel Watkins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        tree, path = workingtree.WorkingTree.open_containing(directory)
224
224
        manager = tree.get_shelf_manager()
225
225
        if shelf_id is not None:
226
 
            shelf_id = int(shelf_id)
 
226
            try:
 
227
                shelf_id = int(shelf_id)
 
228
            except ValueError:
 
229
                raise errors.InvalidShelfId(shelf_id)
227
230
        else:
228
231
            shelf_id = manager.last_shelf()
229
232
            if shelf_id is None: