Calling remove on a PPPoE interface that is already gone will also call flush_addrs() which can - if the interface is already gone - throw an error.
>>> from vyos.ifconfig import PPPoEIf
>>> tmp = PPPoEIf('pppoe10000')
>>> tmp.flush_addrs()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1361, in flush_addrs
self._cmd(cmd)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 66, in _cmd
return cmd(command, self.debug, env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 189, in cmd
raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: None ip addr flush dev pppoe10000
returned:
exit code: 1