/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/controllers/inventory_ui.py

  • Committer: Michael Hudson
  • Date: 2009-02-11 03:23:45 UTC
  • mto: This revision was merged to the branch mainline in revision 269.
  • Revision ID: michael.hudson@canonical.com-20090211032345-prsvgmu2mmpqarbq
more careful argument processing

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
            if file_id is None:
118
118
                raise HTTPNotFound()
119
119
        else:
120
 
            path = rev_tree.id2path(file_id)
 
120
            if file_id is None:
 
121
                path = ''
 
122
            else:
 
123
                try:
 
124
                    path = rev_tree.id2path(file_id)
 
125
                except errors.NoSuchId:
 
126
                    raise HTTPNotFound()
121
127
 
122
128
        # Are we at the top of the tree
123
129
        if path in ['/', '']:
124
130
            updir = None
125
131
        else:
126
 
            updir = dirname(path)[1:]
 
132
            updir = dirname(path)
127
133
 
128
134
        # Directory Breadcrumbs
129
135
        directory_breadcrumbs = util.directory_breadcrumbs(