Beispiel #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)}
Beispiel #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)}
Beispiel #3
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("player")
Beispiel #4
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("room")
Beispiel #5
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("authorizer")

Beispiel #6
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("user")
Beispiel #7
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("shared_functions")
Beispiel #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()