Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
salt.26901
remove-redundand-overrides-causing-confusing-de...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-redundand-overrides-causing-confusing-debug-l.patch of Package salt.26901
From 42f42792dbe5a79a146727f8ee83455eb5276531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yeray=20Guti=C3=A9rrez=20Cedr=C3=A9s?= <yeray.gutierrez@suse.com> Date: Mon, 9 May 2022 13:45:29 +0100 Subject: [PATCH] Remove redundand overrides causing confusing DEBUG log (bsc#1189501) --- salt/_compat.py | 74 ------------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/salt/_compat.py b/salt/_compat.py index 22daaa31a0..ecd42e5f75 100644 --- a/salt/_compat.py +++ b/salt/_compat.py @@ -231,81 +231,7 @@ class IPv6InterfaceScoped(ipaddress.IPv6Interface, IPv6AddressScoped): self.hostmask = self.network.hostmask -def ip_address(address): - """Take an IP string/int and return an object of the correct type. - - Args: - address: A string or integer, the IP address. Either IPv4 or - IPv6 addresses may be supplied; integers less than 2**32 will - be considered to be IPv4 by default. - - Returns: - An IPv4Address or IPv6Address object. - - Raises: - ValueError: if the *address* passed isn't either a v4 or a v6 - address - - """ - try: - return ipaddress.IPv4Address(address) - except (ipaddress.AddressValueError, ipaddress.NetmaskValueError) as err: - log.debug('Error while parsing IPv4 address: %s', address) - log.debug(err) - - try: - return IPv6AddressScoped(address) - except (ipaddress.AddressValueError, ipaddress.NetmaskValueError) as err: - log.debug('Error while parsing IPv6 address: %s', address) - log.debug(err) - - if isinstance(address, bytes): - raise ipaddress.AddressValueError('{} does not appear to be an IPv4 or IPv6 address. ' - 'Did you pass in a bytes (str in Python 2) instead ' - 'of a unicode object?'.format(repr(address))) - - raise ValueError('{} does not appear to be an IPv4 or IPv6 address'.format(repr(address))) - - -def ip_interface(address): - """Take an IP string/int and return an object of the correct type. - - Args: - address: A string or integer, the IP address. Either IPv4 or - IPv6 addresses may be supplied; integers less than 2**32 will - be considered to be IPv4 by default. - - Returns: - An IPv4Interface or IPv6Interface object. - - Raises: - ValueError: if the string passed isn't either a v4 or a v6 - address. - - Notes: - The IPv?Interface classes describe an Address on a particular - Network, so they're basically a combination of both the Address - and Network classes. - - """ - try: - return ipaddress.IPv4Interface(address) - except (ipaddress.AddressValueError, ipaddress.NetmaskValueError) as err: - log.debug('Error while getting IPv4 interface for address %s', address) - log.debug(err) - - try: - return ipaddress.IPv6Interface(address) - except (ipaddress.AddressValueError, ipaddress.NetmaskValueError) as err: - log.debug('Error while getting IPv6 interface for address %s', address) - log.debug(err) - - raise ValueError('{} does not appear to be an IPv4 or IPv6 interface'.format(address)) - - if ipaddress: ipaddress.IPv6Address = IPv6AddressScoped if sys.version_info.major == 2: ipaddress.IPv6Interface = IPv6InterfaceScoped - ipaddress.ip_address = ip_address - ipaddress.ip_interface = ip_interface -- 2.35.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor