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

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

 



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.

johannes


_______________________________________________
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