mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 08:05:35 +00:00
Merge pull request #5 from pixel-stuck/master
Switch errors: Set 'err_description' var unconditionally before searching
This commit is contained in:
commit
de7591e73f
|
@ -102,6 +102,9 @@ class Err:
|
|||
else:
|
||||
err_module = "Unknown"
|
||||
|
||||
# Set initial value unconditionally
|
||||
err_description = self.no_err_desc
|
||||
|
||||
# Searching for error codes related to the Switch
|
||||
# (doesn't include special cases)
|
||||
if errcode in switch_known_errcodes:
|
||||
|
@ -112,8 +115,6 @@ class Err:
|
|||
for errcode_range in switch_known_errcode_ranges[module]:
|
||||
if desc >= errcode_range[0] and desc <= errcode_range[1]:
|
||||
err_description = errcode_range[2]
|
||||
else:
|
||||
err_description = self.no_err_desc
|
||||
|
||||
# Make a nice Embed out of it
|
||||
embed = discord.Embed(title=f"{str_errcode} / {hex(errcode)}",
|
||||
|
|
Loading…
Reference in a new issue