diff options
| author | aripinen <[email protected]> | 2022-02-10 16:51:40 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:51:40 +0300 |
| commit | 22fd97ec17bb5558bdcb798cba32c8cc01355300 (patch) | |
| tree | ab7fbbf3253d4c0e2793218f09378908beb025fb /build/plugins/sandbox_registry.py | |
| parent | ebc3b27e44d5f5720b1a1fe3cc8dfc1bc15658b7 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/sandbox_registry.py')
| -rw-r--r-- | build/plugins/sandbox_registry.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/build/plugins/sandbox_registry.py b/build/plugins/sandbox_registry.py index a96456ebe12..dc1be399b32 100644 --- a/build/plugins/sandbox_registry.py +++ b/build/plugins/sandbox_registry.py @@ -1,21 +1,21 @@ -import os - -import ymake - - -def onregister_sandbox_import(unit, *args): - args = iter(args) - for path in args: - path = os.path.normpath(path) - source = unit.resolve_arc_path(path) - abs_source = unit.resolve(source) - if not os.path.exists(abs_source): - ymake.report_configure_error('REGISTER_SANDBOX_IMPORT: File or directory {} does not exists'.format(path)) - splited_path = path.split(os.sep) - l, r = 0, len(splited_path) - if splited_path[-1] == "__init__.py": - r -= 1 - if not splited_path[0]: - l += 1 - path = ".".join(splited_path[l:r]) - unit.onresource(["-", "{}.{}={}".format("SANDBOX_TASK_REGISTRY", path, path)]) +import os + +import ymake + + +def onregister_sandbox_import(unit, *args): + args = iter(args) + for path in args: + path = os.path.normpath(path) + source = unit.resolve_arc_path(path) + abs_source = unit.resolve(source) + if not os.path.exists(abs_source): + ymake.report_configure_error('REGISTER_SANDBOX_IMPORT: File or directory {} does not exists'.format(path)) + splited_path = path.split(os.sep) + l, r = 0, len(splited_path) + if splited_path[-1] == "__init__.py": + r -= 1 + if not splited_path[0]: + l += 1 + path = ".".join(splited_path[l:r]) + unit.onresource(["-", "{}.{}={}".format("SANDBOX_TASK_REGISTRY", path, path)]) |
