Use robot_env from gen_print to set local robot_env.

This will give us more accurate results.

Change-Id: I7016d9ee6bb27965188760fd26e69a603b7a5e6c
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_misc.py b/lib/gen_misc.py
index dc2f36f..9f7e10a 100755
--- a/lib/gen_misc.py
+++ b/lib/gen_misc.py
@@ -16,12 +16,9 @@
 import gen_print as gp
 import gen_cmd as gc
 
-
-robot_env = 1
-try:
+robot_env = gp.robot_env
+if robot_env:
     from robot.libraries.BuiltIn import BuiltIn
-except ImportError:
-    robot_env = 0
 
 
 def add_trailing_slash(dir_path):