diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-02-09 21:05:54 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-02-09 21:05:54 -0300 |
commit | 8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30 (patch) | |
tree | 51fb58185ec9a7322016e9c7962b11bd878d1f8c | |
parent | 61478fa9524ee7dfb223730592200495fe08ee63 (diff) | |
download | tkinter-8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30.tar.gz tkinter-8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30.tar.bz2 tkinter-8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30.tar.xz tkinter-8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30.zip |
Make Discord errors non-fatal (regardless of the error)
-rwxr-xr-x | __main__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/__main__.py b/__main__.py index aa5cd49..0cbb850 100755 --- a/__main__.py +++ b/__main__.py @@ -19,6 +19,7 @@ OBFS = uuid.getnode() % 256 # Get a number which *usually* doesn't change OBFS = 185 # <- For debugging (FIXME ^ above didn't held up in practice) # TODO: Maybe we can do len() for the absolute path to this script # Then % 256 it so we always have a valid unchanging obfuscation? >_> +# TODO: Make a .ico for this, and pyinstaller -i? (--onefile) print("Obfuscation key = %d" % OBFS) # <- Just to not leave it in plain text ## Internal wrapper for preferences @@ -103,9 +104,10 @@ if pref["discord"]: _rpc = None print("Failed to load Discord RPC!\n%s" % err) except (FileNotFoundError, discordrpc.exceptions.Error): - if not sys.platform.startswith('win'): - raise - else: + err = traceback.format_exc().split("\n")[-2] + _rpc = None + print("Failed to load Discord RPC!\n%s" % err) + except: err = traceback.format_exc().split("\n")[-2] _rpc = None print("Failed to load Discord RPC!\n%s" % err) |