Skip to content

Commit

Permalink
Fix the should_run methods of the network spoke
Browse files Browse the repository at this point in the history
The network spoke should use the same logic for its visibility in TUI and GUI.
  • Loading branch information
poncovka committed Jan 25, 2021
1 parent 913bd78 commit 6b80b7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyanaconda/ui/gui/spokes/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,14 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):

category = SystemCategory

@classmethod
def should_run(cls, environment, data):
"""Should the spoke run?"""
if not FirstbootSpokeMixIn.should_run(environment, data):
return False

return conf.system.can_configure_network

def __init__(self, *args, **kwargs):
NormalSpoke.__init__(self, *args, **kwargs)
self.networking_changed = False
Expand Down
4 changes: 4 additions & 0 deletions pyanaconda/ui/tui/spokes/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ def __init__(self, data, storage, payload):

@classmethod
def should_run(cls, environment, data):
"""Should the spoke run?"""
if not FirstbootSpokeMixIn.should_run(environment, data):
return False

return conf.system.can_configure_network

def initialize(self):
Expand Down

0 comments on commit 6b80b7b

Please sign in to comment.