summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-02-09 21:05:54 -0300
committerJesusaves <cpntb1@ymail.com>2024-02-09 21:05:54 -0300
commit8dc17fbd9ca0eb4ca2d7b6095a656b279e3f9a30 (patch)
tree51fb58185ec9a7322016e9c7962b11bd878d1f8c
parent61478fa9524ee7dfb223730592200495fe08ee63 (diff)
downloadtkinter-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__.py8
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)