diff --git a/netbox_dns_bridge/catalog_zone_manager.py b/netbox_dns_bridge/catalog_zone_manager.py index d5d43cf..054b4e5 100644 --- a/netbox_dns_bridge/catalog_zone_manager.py +++ b/netbox_dns_bridge/catalog_zone_manager.py @@ -15,11 +15,12 @@ LOGGER = get_logger(__name__) def increment_soa_serial() -> int: with transaction.atomic(): try: - soa_serial_obj, _ = ( - IntegerKeyValueSetting.objects.select_for_update().get_or_create( - key="catalog-zone-soa-serial", - defaults={"value": 1}, - ) + ( + soa_serial_obj, + _, + ) = IntegerKeyValueSetting.objects.select_for_update().get_or_create( + key="catalog-zone-soa-serial", + defaults={"value": 1}, ) new_soa_serial = soa_serial_obj.value + 1 diff --git a/netbox_dns_bridge/utils.py b/netbox_dns_bridge/utils.py index 846c5f7..753d130 100644 --- a/netbox_dns_bridge/utils.py +++ b/netbox_dns_bridge/utils.py @@ -42,8 +42,7 @@ def build_dns_zone(nb_zone: netbox_dns.models.Zone) -> dns.zone.Zone: # an unquoted value to be larger then 255 characters, # it misunderstood everything behind a ; as a comment. chunks = [ - '"{}"'.format(value[i : i + 255]) - for i in range(0, len(value), 255) + '"{}"'.format(value[i : i + 255]) for i in range(0, len(value), 255) ] value = " ".join(chunks) else: