python: Fixup incorrect syntax in PyBind argument handler
authorAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 27 Apr 2018 18:05:31 +0000 (19:05 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 28 Jun 2018 17:39:36 +0000 (17:39 +0000)
Change-Id: Ie81104d89b554795ec1020d5ce4edcf28795eda8
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/11511
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/python/m5/util/pybind.py

index 003c233b177b6a761f0281df47a279a21a9fa85d..f666547863ff2b0d11a44dfb5bff82c8202cfe66 100644 (file)
@@ -63,7 +63,7 @@ class PyBindMethod(PyBindExport):
     def _conv_arg(self, value):
         if isinstance(value, bool):
             return "true" if value else "false"
-        elif isinstance(value, float, int):
+        elif isinstance(value, (float, int)):
             return repr(value)
         else:
             raise TypeError("Unsupported PyBind default value type")