← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~ogayot/curtin:install-step-by-step into curtin:master

 


Diff comments:

> diff --git a/curtin/commands/install.py b/curtin/commands/install.py
> index 7d108d1..b029377 100644
> --- a/curtin/commands/install.py
> +++ b/curtin/commands/install.py
> @@ -162,6 +214,11 @@ class WorkingDir(object):
>                   'TARGET_MOUNT_POINT': self.target,
>                   'CONFIG': self.config_file})
>  
> +    def export(self, path):
> +        """ Export all attributes so that they can be loaded again later. """
> +        with open(path, mode="w") as fh:
> +            json.dump(self.__dict__, fh)

My understanding of the versions of Python (and other deps) that we support in curtin is very unclear so I kept it to the bare minimum. But yes, `attr.asdict` should be cleaner :)

> +
>  
>  class Stage(object):
>  


-- 
https://code.launchpad.net/~ogayot/curtin/+git/curtin/+merge/427671
Your team curtin developers is subscribed to branch curtin:master.



References