diff options
-rwxr-xr-x | scripts/devtool | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool index acc4e0e982..d7a5903c9f 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
@@ -15,7 +15,6 @@ import re | |||
15 | import configparser | 15 | import configparser |
16 | import logging | 16 | import logging |
17 | 17 | ||
18 | workspace = {} | ||
19 | config = None | 18 | config = None |
20 | context = None | 19 | context = None |
21 | 20 | ||
@@ -87,7 +86,6 @@ class Context: | |||
87 | 86 | ||
88 | 87 | ||
89 | def read_workspace(basepath): | 88 | def read_workspace(basepath): |
90 | global workspace | ||
91 | workspace = {} | 89 | workspace = {} |
92 | if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): | 90 | if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): |
93 | if context.fixed_setup: | 91 | if context.fixed_setup: |
@@ -132,6 +130,8 @@ def read_workspace(basepath): | |||
132 | logger.debug('Found recipe %s' % pnvalues) | 130 | logger.debug('Found recipe %s' % pnvalues) |
133 | workspace[pn] = pnvalues | 131 | workspace[pn] = pnvalues |
134 | 132 | ||
133 | return workspace | ||
134 | |||
135 | def create_workspace(args, config, basepath, workspace): | 135 | def create_workspace(args, config, basepath, workspace): |
136 | if args.layerpath: | 136 | if args.layerpath: |
137 | workspacedir = os.path.abspath(args.layerpath) | 137 | workspacedir = os.path.abspath(args.layerpath) |
@@ -330,9 +330,9 @@ def main(): | |||
330 | args = parser.parse_args(unparsed_args, namespace=global_args) | 330 | args = parser.parse_args(unparsed_args, namespace=global_args) |
331 | 331 | ||
332 | try: | 332 | try: |
333 | workspace = {} | ||
333 | if not getattr(args, 'no_workspace', False): | 334 | if not getattr(args, 'no_workspace', False): |
334 | read_workspace(basepath) | 335 | workspace = read_workspace(basepath) |
335 | |||
336 | ret = args.func(args, config, basepath, workspace) | 336 | ret = args.func(args, config, basepath, workspace) |
337 | except DevtoolError as err: | 337 | except DevtoolError as err: |
338 | if str(err): | 338 | if str(err): |