aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-12 13:07:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-12 13:07:07 -0300
commit16c508ac782cc6957d2190f76e3b537b92e7a2cc (patch)
tree79af31cad5f5b842269297c707e26214a40a6724
parented057f5ac019dd8bf523e3af9843362cbe48f80e (diff)
downloadpuppet-virtual-16c508ac782cc6957d2190f76e3b537b92e7a2cc.tar.gz
puppet-virtual-16c508ac782cc6957d2190f76e3b537b92e7a2cc.tar.bz2
Check if memory_limit is available on templates
-rw-r--r--templates/rss.hard.erb2
-rw-r--r--templates/rss.soft.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/rss.hard.erb b/templates/rss.hard.erb
index 31a8030..357dbac 100644
--- a/templates/rss.hard.erb
+++ b/templates/rss.hard.erb
@@ -1 +1 @@
-<%= memory_limit.to_i * 1_000_000 / 4096 %>
+<%= memory_limit.to_i * 1_000_000 / 4096 if defined?(memory_limit) %>
diff --git a/templates/rss.soft.erb b/templates/rss.soft.erb
index 31a8030..357dbac 100644
--- a/templates/rss.soft.erb
+++ b/templates/rss.soft.erb
@@ -1 +1 @@
-<%= memory_limit.to_i * 1_000_000 / 4096 %>
+<%= memory_limit.to_i * 1_000_000 / 4096 if defined?(memory_limit) %>