Remove all resources with timestamp earlier than that given.

        Returns the number of entries removed. Will raise an excpetion
        if there are any entries without a timestamp.

def prune_before(self, timestamp):
        """Remove all resources with timestamp earlier than that given.

        Returns the number of entries removed. Will raise an excpetion
        if there are any entries without a timestamp.
        """
        n = 0
        pruned = []
        for r in self.resources:
            if (r.timestamp is None):
                raise Exception("Entry %s has no timestamp" % (r.uri))
            elif (r.timestamp >= timestamp):
                pruned.append(r)
            else:
                n += 1
        self.resources = pruned
        return(n)