mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-04 19:40:02 +03:00
[2199] Add Broader Exception
This commit is contained in:
parent
15f4cccbed
commit
0410806152
@ -361,8 +361,8 @@ def fetch_kill_switches(target=DEFAULT_KILLSWITCH_URL) -> KillSwitchJSONFile | N
|
||||
logger.warning(f"Failed to get kill switches, data was invalid: {e}")
|
||||
return None
|
||||
|
||||
except (requests.exceptions.BaseHTTPError, requests.exceptions.ConnectionError) as e: # type: ignore
|
||||
logger.warning(f"unable to connect to {target!r}: {e}")
|
||||
except requests.exceptions.RequestException as requ_err:
|
||||
logger.warning(f"unable to connect to {target!r}: {requ_err}")
|
||||
return None
|
||||
|
||||
return data
|
||||
|
@ -63,11 +63,11 @@ class Label(tk.Label):
|
||||
super().__init__(master, **kw)
|
||||
|
||||
|
||||
class EntryMenu(ttk.Entry):
|
||||
class EntryMenu:
|
||||
"""Extended entry widget that includes a context menu with Copy, Cut-and-Paste commands."""
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
ttk.Entry.__init__(self, *args, **kwargs)
|
||||
|
||||
self.menu = tk.Menu(self, tearoff=False)
|
||||
self.menu.add_command(label="Copy", command=self.copy)
|
||||
@ -120,7 +120,7 @@ class EntryMenu(ttk.Entry):
|
||||
pass
|
||||
|
||||
|
||||
class Entry(ttk.Entry or EntryMenu): # type: ignore
|
||||
class Entry(ttk.Entry, EntryMenu):
|
||||
"""Custom t(t)k.Entry class to fix some display issues."""
|
||||
|
||||
# DEPRECATED: Migrate to ttk.Entry or EntryMenu. Will remove in 5.12 or later.
|
||||
|
Loading…
x
Reference in New Issue
Block a user