summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-06-03 07:38:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-06-08 09:08:26 +0200
commited51fad53a1375c2af944d22869ee61fc4bf2d22 (patch)
tree2afac77df1c480566c6eb1e26a258a6a3e58e624
parentbsps/atsam: Fix type of options (diff)
downloadrtems-ed51fad53a1375c2af944d22869ee61fc4bf2d22.tar.bz2
build: Assert value properties only if not None
-rwxr-xr-xwscript18
1 files changed, 9 insertions, 9 deletions
diff --git a/wscript b/wscript
index 59ab96c43d..8ad0ed30b1 100755
--- a/wscript
+++ b/wscript
@@ -744,7 +744,7 @@ class OptionItem(Item):
return value
def _assert_aligned(self, conf, cic, value, arg):
- if value % arg != 0:
+ if value is not None and value % arg != 0:
conf.fatal(
"Value '{}' for option '{}' is not aligned by '{}'".format(
value, self.data["name"], arg
@@ -753,7 +753,7 @@ class OptionItem(Item):
return value
def _assert_eq(self, conf, cic, value, arg):
- if value != arg:
+ if value is not None and value != arg:
conf.fatal(
"Value '{}' for option '{}' is not equal to {}".format(
value, self.data["name"], arg
@@ -762,7 +762,7 @@ class OptionItem(Item):
return value
def _assert_ge(self, conf, cic, value, arg):
- if value < arg:
+ if value is not None and value < arg:
conf.fatal(
"Value '{}' for option '{}' is not greater than or equal to {}".format(
value, self.data["name"], arg
@@ -771,7 +771,7 @@ class OptionItem(Item):
return value
def _assert_gt(self, conf, cic, value, arg):
- if value <= arg:
+ if value is not None and value <= arg:
conf.fatal(
"Value '{}' for option '{}' is not greater than {}".format(
value, self.data["name"], arg
@@ -780,7 +780,7 @@ class OptionItem(Item):
return value
def _assert_in_interval(self, conf, cic, value, arg):
- if value < arg[0] or value > arg[1]:
+ if value is not None and (value < arg[0] or value > arg[1]):
conf.fatal(
"Value '{}' for option '{}' is not in closed interval [{}, {}]".format(
value, self.data["name"], arg[0], arg[1]
@@ -805,7 +805,7 @@ class OptionItem(Item):
)
def _assert_le(self, conf, cic, value, arg):
- if value > arg:
+ if value is not None and value > arg:
conf.fatal(
"Value '{}' for option '{}' is not less than or equal to {}".format(
value, self.data["name"], arg
@@ -814,7 +814,7 @@ class OptionItem(Item):
return value
def _assert_lt(self, conf, cic, value, arg):
- if value >= arg:
+ if value is not None and value >= arg:
conf.fatal(
"Value '{}' for option '{}' is not less than {}".format(
value, self.data["name"], arg
@@ -823,7 +823,7 @@ class OptionItem(Item):
return value
def _assert_ne(self, conf, cic, value, arg):
- if value == arg:
+ if value is not None and value == arg:
conf.fatal(
"Value '{}' for option '{}' is not unequal to {}".format(
value, self.data["name"], arg
@@ -832,7 +832,7 @@ class OptionItem(Item):
return value
def _assert_power_of_two(self, conf, cic, value, arg):
- if value <= 0 or (value & (value - 1)) != 0:
+ if value is not None and (value <= 0 or (value & (value - 1)) != 0):
conf.fatal(
"Value '{}' for option '{}' is not a power of two".format(
value, self.data["name"]