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 | ebc3b27e44d5f5720b1a1fe3cc8dfc1bc15658b7 (patch) | |
tree | 3e407c1a56ca0b28a6dff13bef4ea5060e40997c /build/plugins | |
parent | 6018ed17c37797f38d832535223970c73863306f (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'build/plugins')
-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 dc1be399b32..a96456ebe12 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)]) |