Revision d2fc71c9 snf-pithos-backend/pithos/backends/lib/sqlite/node.py

b/snf-pithos-backend/pithos/backends/lib/sqlite/node.py
623 623
        self.execute(q, args)
624 624
        return self.fetchall()
625 625

  
626
    def version_get_properties(self, serial, keys=(), propnames=_propnames):
626
    def version_get_properties(self, serial, keys=(), propnames=_propnames,
627
                               node=None):
627 628
        """Return a sequence of values for the properties of
628 629
           the version specified by serial and the keys, in the order given.
629 630
           If keys is empty, return all properties in the order
......
632 633

  
633 634
        q = ("select serial, node, hash, size, type, source, mtime, muser, uuid, checksum, cluster "
634 635
             "from versions "
635
             "where serial = ?")
636
        self.execute(q, (serial,))
636
             "where serial = ? ")
637
        args = [serial]
638
        if node is not None:
639
            q += ("and node = ?")
640
            args += [node]
641
        self.execute(q, args)
637 642
        r = self.fetchone()
638 643
        if r is None:
639 644
            return r

Also available in: Unified diff