Revision cc8c14d0 pithos/backends/simple.py
b/pithos/backends/simple.py | ||
---|---|---|
211 | 211 |
if self._get_pathcount(account) > 0: |
212 | 212 |
raise IndexError('Account is not empty') |
213 | 213 |
sql = 'delete from versions where name = ?' |
214 |
self.con.execute(sql, (path,))
|
|
214 |
self.con.execute(sql, (account,))
|
|
215 | 215 |
sql = 'delete from groups where name = ?' |
216 | 216 |
self.con.execute(sql, (account,)) |
217 | 217 |
self.con.commit() |
... | ... | |
643 | 643 |
|
644 | 644 |
def _get_version(self, path, version=None): |
645 | 645 |
if version is None: |
646 |
sql = '''select version_id, user, strftime('%s', tstamp), size, hide from versions where name = ?
|
|
646 |
sql = '''select version_id, user, tstamp, size, hide from versions where name = ?
|
|
647 | 647 |
order by version_id desc limit 1''' |
648 | 648 |
c = self.con.execute(sql, (path,)) |
649 | 649 |
row = c.fetchone() |
... | ... | |
651 | 651 |
raise NameError('Object does not exist') |
652 | 652 |
else: |
653 | 653 |
# The database (sqlite) will not complain if the version is not an integer. |
654 |
sql = '''select version_id, user, strftime('%s', tstamp), size from versions where name = ?
|
|
654 |
sql = '''select version_id, user, tstamp, size from versions where name = ?
|
|
655 | 655 |
and version_id = ?''' |
656 | 656 |
c = self.con.execute(sql, (path, version)) |
657 | 657 |
row = c.fetchone() |
Also available in: Unified diff