aboutsummaryrefslogtreecommitdiff
path: root/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'backends.py')
-rwxr-xr-xbackends.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends.py b/backends.py
index 13e00b1..9265ade 100755
--- a/backends.py
+++ b/backends.py
@@ -41,8 +41,10 @@ def do_replacement(regex, line, confdata):
pass
elif isinstance(var, nodes.StringStatement):
var = var.get_value()
+ elif isinstance(var, int):
+ var = str(var)
else:
- raise RuntimeError('Tried to replace a variable with something other than a string.')
+ raise RuntimeError('Tried to replace a variable with something other than a string or int.')
else:
var = ''
line = line.replace('@' + varname + '@', var)