Fix grains generation when psutil is not installed

Change-Id: I5b113da2c7b4b137794d4c762201b396e7bf910b
diff --git a/heka/meta/heka.yml b/heka/meta/heka.yml
index fb05ef0..3c4db74 100644
--- a/heka/meta/heka.yml
+++ b/heka/meta/heka.yml
@@ -104,7 +104,11 @@
       module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
       config:
         hostname: "{{ grains.fqdn.split('.')[0] }}"
+        {%- if 'ps.swap_memory' in salt.keys() %}
         swap_size: {{ salt['ps.swap_memory']()['total'] }}
+        {%- else %}
+        swap_size: 0
+        {%- endif %}
     metric:
       engine: sandbox
       module_file: /usr/share/lma_collector/decoders/metric.lua