remove last errant file parse warning

provide a way to be able to instantiate the config object without
parsing a config file. This is expected to only be used for the
config file generator comparitor.

This means we finally don't generate warning messages on config
file parsing during our pep8 runs, and we do the right thing and
explode during tests if the config file doesn't exist in a real
way.

Change-Id: Ic4ae22814e2fdafc89a1997471283ccf8f3663bc
diff --git a/tempest/common/generate_sample_tempest.py b/tempest/common/generate_sample_tempest.py
index 71e04f0..6097aa8 100644
--- a/tempest/common/generate_sample_tempest.py
+++ b/tempest/common/generate_sample_tempest.py
@@ -33,5 +33,5 @@
 
 
 if __name__ == "__main__":
-    CONF = tempest.config.TempestConfigPrivate()
+    CONF = tempest.config.TempestConfigPrivate(False)
     generator.generate(sys.argv[1:])
diff --git a/tempest/config.py b/tempest/config.py
index a51c380..1247a8d 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -18,7 +18,6 @@
 from __future__ import print_function
 
 import os
-import sys
 
 from oslo.config import cfg
 
@@ -654,7 +653,7 @@
 
     DEFAULT_CONFIG_FILE = "tempest.conf"
 
-    def __init__(self):
+    def __init__(self, parse_conf=True):
         """Initialize a configuration from a conf directory and conf file."""
         super(TempestConfigPrivate, self).__init__()
         config_files = []
@@ -672,10 +671,9 @@
                 'TEMPEST_CONFIG' in os.environ):
             path = failsafe_path
 
-        if not os.path.exists(path):
-            msg = "Config file %s not found" % path
-            print(RuntimeError(msg), file=sys.stderr)
-        else:
+        # only parse the config file if we expect one to exist. This is needed
+        # to remove an issue with the config file up to date checker.
+        if parse_conf:
             config_files.append(path)
 
         cfg.CONF([], project='tempest', default_config_files=config_files)