Skip to content

Commit

Permalink
Fix domain type fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
TobleMiner committed Sep 7, 2020
1 parent 622cc19 commit a29e795
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ def from_parser(cls, section, parser, globals):
def __init__(self, name, parser, globals):
''' Initialize common options
'''
from domain import Domain

self.name = name
self.interfaces = list(map(str.strip, parser.get(name, 'Interfaces', fallback='').split(',')))
self.mcast_link = parser.get(name, 'MulticastLinkAddress', fallback=globals.mcast_link)
self.mcast_site = parser.get(name, 'MulticastSiteAddress', fallback=globals.mcast_site)
self.ipv4_gateway = parser.get(name, 'IPv4Gateway', fallback=globals.ipv4_gateway)
self.domain_type = Domain

class BatmanDomainOptions(DomainOptions):
''' Container for batman specific options
Expand Down Expand Up @@ -78,7 +81,7 @@ def _initialize_global_options(self, parser):
parser.get(None, 'MulticastLinkAddress', fallback='ff02::2:1001'),
parser.get(None, 'MulticastSiteAddress', fallback='ff05::2:1001'),
parser.get(None, 'DefaultDomain', fallback=None),
parser.get(None, 'DefaultDomainType', fallback=None),
parser.get(None, 'DefaultDomainType', fallback='simple'),
parser.get(None, 'IPv4Gateway', fallback=None),
)

Expand Down

0 comments on commit a29e795

Please sign in to comment.