Re: [RFC v2] tests: Catch only specific exceptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019/02/10 16:25, Johannes Berg wrote:
On Sun, 2019-02-10 at 14:30 +0900, Masashi Honma wrote:
+    except IOError as e:
+        if e.errno == errno.EAGAIN:
+            return False
+        raise e

You should (typically) just "raise" instead of "raise e" to re-raise a
caught exception. If you do "raise e", the stacktrace will point to that
rather than the original source of the error.

Thank you, I have not know that.
By my test, "raise e" issue occurs on only python2 environment.
Anyway just "raise" works on both.
I will fix it.

Masashi Honma.

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux