mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
wrapper/wrapper: handle unset self.wrapped_config_path
This commit is contained in:
parent
8b0ca115a7
commit
9bd2bd46a9
1 changed files with 4 additions and 2 deletions
|
@ -35,7 +35,7 @@ class Wrapper(WrapperProtocol):
|
|||
uuid: str
|
||||
identifier: str
|
||||
type: str
|
||||
wrapped_config_path: str
|
||||
wrapped_config_path: Optional[str]
|
||||
argv_override: Optional[list[str]]
|
||||
should_exit: bool
|
||||
atexit_registered: bool
|
||||
|
@ -46,6 +46,7 @@ class Wrapper(WrapperProtocol):
|
|||
self.argv_override = None
|
||||
self.should_exit = True
|
||||
self.atexit_registered = False
|
||||
self.wrapped_config_path = None
|
||||
|
||||
def filter_args_wrapper(self, args):
|
||||
"""filter out -c/--config since it doesn't apply in wrapper"""
|
||||
|
@ -89,6 +90,7 @@ class Wrapper(WrapperProtocol):
|
|||
return wrapped_config
|
||||
|
||||
def at_exit(self):
|
||||
if self.wrapped_config_path:
|
||||
os.remove(self.wrapped_config_path)
|
||||
self.stop()
|
||||
self.atexit_registered = False
|
||||
|
|
Loading…
Add table
Reference in a new issue