| From 292e2fd4b52409eab05149b0d63e0291bec3786a Mon Sep 17 00:00:00 2001 |
| From: Sergey Kozlov <sergey.kozlov@intel.com> |
| Date: Mon, 11 Dec 2017 17:04:20 +0100 |
| Subject: [PATCH] PEP 479: 'return' instead of 'raise StopIteration'. |
| |
| Fro details please visit https://www.python.org/dev/peps/pep-0479/ |
| --- |
| netaddr/ip/__init__.py | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py |
| index 489badf..ecf72d0 100644 |
| --- a/netaddr/ip/__init__.py |
| +++ b/netaddr/ip/__init__.py |
| @@ -1258,7 +1258,7 @@ def subnet(self, prefixlen, count=None, fmt=None): |
| |
| if not self.prefixlen <= prefixlen: |
| # Don't return anything. |
| - raise StopIteration |
| + return |
| |
| # Calculate number of subnets to be returned. |
| width = self._module.width |