Jasjeet Rangi has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/65311?usp=email )

Change subject: stdlib: Fix get_isa_from_str() exception behavior in isas.py
......................................................................

stdlib: Fix get_isa_from_str() exception behavior in isas.py

When given an input string that does not match any valid ISA, the
get_isa_from_str() function should call get_isas_str_set() to to print
the valid ISA strings in the exception. The current behavior is to
recursively call get_isa_from_str() with no input, which prevents
the correct exception from being raised. This change causes the
correct exception to be raised for invalid inputs.

Change-Id: I92bfe862bbd99ce0b63bfc124e539fab3b175e0c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65311
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/python/gem5/isas.py
1 file changed, 21 insertions(+), 1 deletion(-)

Approvals:
  Bobby Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/isas.py b/src/python/gem5/isas.py
index c904c9d..84f02b8 100644
--- a/src/python/gem5/isas.py
+++ b/src/python/gem5/isas.py
@@ -81,7 +81,7 @@
             return isa

     valid_isas_str_list = str()
-    for isa_str in get_isa_from_str():
+    for isa_str in get_isas_str_set():
         valid_isas_str_list += f"{os.linesep}{isa_str}"

     raise Exception(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/65311?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I92bfe862bbd99ce0b63bfc124e539fab3b175e0c
Gerrit-Change-Number: 65311
Gerrit-PatchSet: 2
Gerrit-Owner: Jasjeet Rangi <jasra...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jasjeet Rangi <jasra...@ucdavis.edu>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to