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)}
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("player")
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("room")
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("authorizer")
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("user")
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("shared_functions")
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()