[Kimchi-devel] [PATCH] Fix issue 'unable to open database file' when run 'sudo src/wokd --environment=dev'

Aline Manera alinefm at linux.vnet.ibm.com
Fri Oct 30 17:29:14 UTC 2015


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 30/10/2015 12:45, chandra at linux.vnet.ibm.com wrote:
> From: chandrureddy <chandra at linux.vnet.ibm.com>
>
> ---
>   src/wok/plugins/kimchi/root.py | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/wok/plugins/kimchi/root.py b/src/wok/plugins/kimchi/root.py
> index 44452b4..37da8b3 100644
> --- a/src/wok/plugins/kimchi/root.py
> +++ b/src/wok/plugins/kimchi/root.py
> @@ -30,6 +30,15 @@ from wok.root import WokRoot
>
>   class KimchiRoot(WokRoot):
>       def __init__(self, wok_options):
> +        make_dirs = [
> +            os.path.dirname(os.path.abspath(config.get_object_store())),
> +            os.path.abspath(config.get_distros_store()),
> +            os.path.abspath(config.get_screenshot_path())
> +        ]
> +        for directory in make_dirs:
> +            if not os.path.isdir(directory):
> +                os.makedirs(directory)
> +
>           if hasattr(wok_options, "model"):
>               self.model = wok_options.model
>           elif wok_options.test:
> @@ -53,14 +62,5 @@ class KimchiRoot(WokRoot):
>           self.domain = 'kimchi'
>           self.messages = messages
>
> -        make_dirs = [
> -            os.path.dirname(os.path.abspath(config.get_object_store())),
> -            os.path.abspath(config.get_distros_store()),
> -            os.path.abspath(config.get_screenshot_path())
> -        ]
> -        for directory in make_dirs:
> -            if not os.path.isdir(directory):
> -                os.makedirs(directory)
> -
>       def get_custom_conf(self):
>           return config.KimchiConfig()




More information about the Kimchi-devel mailing list