Comment 1 for bug 1949884

Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, the same seems to happen if the origin file does not exist and a subtree is unset (I can file a different bug for this). E.g.:

"""
# netplan set --origin-hint 90-some-random-thing-not-on-disk network=null
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 310, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/set.py", line 53, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 310, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/set.py", line 106, in command_set
    self.write_file(subtree, hint + '.yaml', self.root_dir)
  File "/usr/share/netplan/netplan/cli/commands/set.py", line 176, in write_file
    raise Exception('Invalid input: {}'.format(set_tree))
Exception: Invalid input: {'network': None}
"""