/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/directory_ui.py

  • Committer: Martin Albisetti
  • Date: 2008-08-06 21:25:24 UTC
  • Revision ID: argentina@gmail.com-20080806212524-nc3m9mfg1yub7z3c
Don't traceback if we can't get last-changed date from a branch. Bug #254794

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        self.parity = parity
31
31
        self.branch = branch
32
32
        if branch is not None:
33
 
            self.last_change =  datetime.datetime.fromtimestamp(
34
 
                branch.repository.get_revision(branch.last_revision()).timestamp)
 
33
            # If a branch is empty, bzr raises an exception when trying this
 
34
            try:
 
35
                self.last_change =  datetime.datetime.fromtimestamp(
 
36
                    branch.repository.get_revision(branch.last_revision()).timestamp)
 
37
            except:
 
38
                self.last_change = None
35
39
 
36
40
class DirectoryUI(TemplatedBranchView):
37
41
    """