From ec3a5a49cd0b81b9a2b703902f0e0245fa667a7a Mon Sep 17 00:00:00 2001 From: knotteye Date: Sat, 17 Apr 2021 00:26:54 -0500 Subject: [PATCH] Add main function --- plchat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plchat.py b/plchat.py index 7eaa8ed..a343db1 100644 --- a/plchat.py +++ b/plchat.py @@ -1442,7 +1442,7 @@ def updateAnimationPref(): else: STATIC_PREF = 'static_' -if __name__ == '__main__': +def main(): _mkdir(CACHE+'/img/') _mkdir(CACHE+'/vid/') _mkdir(CACHE+'/audio/') @@ -1451,4 +1451,7 @@ if __name__ == '__main__': app.setOrganizationName("plchat") app.setApplicationName("plchat") ex = App(app.processEvents) - sys.exit(ex._eventloop.run_forever()) \ No newline at end of file + sys.exit(ex._eventloop.run_forever()) + +if __name__ == '__main__': + main() \ No newline at end of file