summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros/expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/aperture_macros/expression.py')
-rw-r--r--gerbonara/aperture_macros/expression.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/aperture_macros/expression.py b/gerbonara/aperture_macros/expression.py
index f545aac..0b2168f 100644
--- a/gerbonara/aperture_macros/expression.py
+++ b/gerbonara/aperture_macros/expression.py
@@ -65,7 +65,10 @@ class Expression:
class UnitExpression(Expression):
def __init__(self, expr, unit):
- self._expr = expr
+ if isinstance(expr, Expression):
+ self._expr = expr
+ else:
+ self._expr = ConstantExpression(expr)
self.unit = unit
def to_gerber(self, unit=None):