summaryrefslogtreecommitdiff
path: root/src/backend/recoverdb.py
blob: c42934037199864de24c8917c8280ff7160183d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3

import animation
import os
import sisyphus.getfs
import sisyphus.syncDatabase

@animation.wait('recovering databases')
def cliExec():
    if os.path.exists(sisyphus.getfs.remotePackagesCsv):
        os.remove(sisyphus.getfs.remotePackagesCsv)
    if os.path.exists(sisyphus.getfs.remoteDescriptionsCsv):
        os.remove(sisyphus.getfs.remoteDescriptionsCsv)
    if os.path.exists(sisyphus.getfs.localPackagesCsv):
        os.remove(sisyphus.getfs.localPackagesCsv)
    if os.path.exists(sisyphus.getfs.localDatabase):
        os.remove(sisyphus.getfs.localDatabase)

    sisyphus.syncDatabase.remoteTable()
    sisyphus.syncDatabase.localTable()