Exemplo n.º 1
0
def update():
    # Open the url
    try:
        f = urlopen(UPDATE_URL)

        # Open our local file for writing
        with open("pingpanther.tar.gz", "wb") as local_file:
            local_file.write(f.read())
            local_file.close()

        update_root = os.path.join(PINGPANTHER_ROOT, "pingpanther_update")
        tar = tarfile.open("pingpanther.tar.gz")
        tar.extractall(path=update_root)
        tar.close()

        # overwrite directory
        dir_util.copy_tree(update_root, PINGPANTHER_ROOT)

        # run migrations
        run_migrations()

    #handle errors
    except Exception, err:
        return {'error': str(err)}
Exemplo n.º 2
0
def update():
    # Open the url
    try:
        f = urlopen(UPDATE_URL)

        # Open our local file for writing
        with open("pingpanther.tar.gz", "wb") as local_file:
            local_file.write(f.read())
            local_file.close()

        update_root = os.path.join(PINGPANTHER_ROOT, "pingpanther_update")
        tar = tarfile.open("pingpanther.tar.gz")
        tar.extractall(path=update_root)
        tar.close()

        # overwrite directory
        dir_util.copy_tree(update_root, PINGPANTHER_ROOT)

        # run migrations
        run_migrations()

    #handle errors
    except Exception, err:
        return {'error': str(err)}
Exemplo n.º 3
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("player")
Exemplo n.º 4
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("room")
Exemplo n.º 5
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("authorizer")

Exemplo n.º 6
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("user")
Exemplo n.º 7
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("shared_functions")
Exemplo n.º 8
0
from gui.gtkgui import run_gui
from migrator import run_migrations

if __name__ == '__main__':
    run_migrations()
    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    run_gui()