jiridanek commented on a change in pull request #1282:
URL: https://github.com/apache/qpid-dispatch/pull/1282#discussion_r665449504



##########
File path: tests/system_tests_qdmanage.py
##########
@@ -86,7 +96,7 @@ def run_qdmanage(self, cmd, input=None, 
expect=Process.EXIT_OK, address=None):
         try:
             p.teardown()
         except Exception as e:
-            raise Exception(out if out else str(e))
+            raise sys.exc_info()[0](out if out else str(e))

Review comment:
       Does `sys.exc_info()[0]` mean `type(e)`?

##########
File path: tests/system_tests_qdmanage.py
##########
@@ -86,7 +96,7 @@ def run_qdmanage(self, cmd, input=None, 
expect=Process.EXIT_OK, address=None):
         try:
             p.teardown()
         except Exception as e:
-            raise Exception(out if out else str(e))
+            raise sys.exc_info()[0](out if out else str(e))

Review comment:
       I'd go for a custom exception class here, probably. `class 
QdManageRunError(Exception):` or something like that. It would then allow 
expecting this in tests, instead of `RuntimeError`, or something unspecific 
like that. But this should serve ok and there is the check on exception message 
text, so it should be well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to