Пример #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)}
Пример #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)}
Пример #3
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("player")
Пример #4
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("room")
Пример #5
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("authorizer")

Пример #6
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("user")
Пример #7
0
#!/usr/bin/env python3

from migrator import run_migrations

run_migrations("shared_functions")
Пример #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()