[riot-notifications] [RIOT-OS/RIOT] Add helper script for Black Magic Probe (#12251)

maz3max notifications at github.com
Wed Sep 25 14:15:10 CEST 2019


maz3max commented on this pull request.



> +
+def gdb_write_and_wait_for_result(gdbmi, cmd, description, expected_result='done'):
+    res = gdbmi.write(cmd, timeout_sec=TIMEOUT)
+    while True:
+        for msg in res:
+            if msg['type'] == 'result':
+                if msg['message'] == expected_result:
+                    print(description, "successful.")
+                    return True
+                else:
+                    print(description, "failed.", file=sys.stderr)
+                    return False
+        res = gdbmi.get_gdb_response(timeout_sec=TIMEOUT)
+
+
+if __name__ == '__main__':

Yeah, you're right. ^^' What do think about the code? Is it readable now?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12251#discussion_r328086108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190925/3b878679/attachment.htm>


More information about the notifications mailing list