aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/macros_with_error.py
diff options
context:
space:
mode:
authorAleksandr <ivansduck@gmail.com>2022-02-10 16:47:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:52 +0300
commitb05913d1c3c02a773578bceb7285084d2933ae86 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /build/plugins/macros_with_error.py
parentea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff)
downloadydb-b05913d1c3c02a773578bceb7285084d2933ae86.tar.gz
Restoring authorship annotation for Aleksandr <ivansduck@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/macros_with_error.py')
-rw-r--r--build/plugins/macros_with_error.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/build/plugins/macros_with_error.py b/build/plugins/macros_with_error.py
index 4cd0544d18..e82fb56d2c 100644
--- a/build/plugins/macros_with_error.py
+++ b/build/plugins/macros_with_error.py
@@ -1,26 +1,26 @@
import sys
-import _common
+import _common
+
+import ymake
+
-import ymake
-
-
def onmacros_with_error(unit, *args):
print >> sys.stderr, 'This macros will fail'
raise Exception('Expected fail in MACROS_WITH_ERROR')
-
-
-def onrestrict_path(unit, *args):
- if args:
- if 'MSG' in args:
- pos = args.index('MSG')
- paths, msg = args[:pos], args[pos + 1:]
- msg = ' '.join(msg)
- else:
- paths, msg = args, 'forbidden'
- if not _common.strip_roots(unit.path()).startswith(paths):
- error_msg = "Path '[[imp]]{}[[rst]]' is restricted - [[bad]]{}[[rst]]. Valid path prefixes are: [[unimp]]{}[[rst]]".format(unit.path(), msg, ', '.join(paths))
- ymake.report_configure_error(error_msg)
+
+
+def onrestrict_path(unit, *args):
+ if args:
+ if 'MSG' in args:
+ pos = args.index('MSG')
+ paths, msg = args[:pos], args[pos + 1:]
+ msg = ' '.join(msg)
+ else:
+ paths, msg = args, 'forbidden'
+ if not _common.strip_roots(unit.path()).startswith(paths):
+ error_msg = "Path '[[imp]]{}[[rst]]' is restricted - [[bad]]{}[[rst]]. Valid path prefixes are: [[unimp]]{}[[rst]]".format(unit.path(), msg, ', '.join(paths))
+ ymake.report_configure_error(error_msg)
def onassert(unit, *args):
val = unit.get(args[0])