Fixing ignored value of --config parameter in tempest account-generator

Config parameter of tempest account-generator was ignored.
Instead of that default location of config file were used.

If tempest.conf file doesn't exist on default location
then command was failing.
It never used the config file value from command line.
Command was running successfully only when running from tempest
directory or tempest.conf exist in current directory

Test cases from below patches are relevant for this patch:
1.) https://review.openstack.org/#/c/608878
    *test_account_generator_no_config_file*

2.) https://review.openstack.org/#/c/620920
    *test_account_generator_exist_config_file*

Partially-Implements: blueprint tempest-cli-unit-test-coverage

Change-Id: Ic8dcaff920e5cdfb9a9457ff3a3137c225622409
Closes-Bug: #1766354
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index 9be8ee2..ce91825 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -293,13 +293,16 @@
 
 
 def main(opts=None):
-    setup_logging()
+    log_warning = False
     if not opts:
-        LOG.warning("Use of: 'tempest-account-generator' is deprecated, "
-                    "please use: 'tempest account-generator'")
+        log_warning = True
         opts = get_options()
     if opts.config_file:
         config.CONF.set_config_path(opts.config_file)
+    setup_logging()
+    if log_warning:
+        LOG.warning("Use of: 'tempest-account-generator' is deprecated, "
+                    "please use: 'tempest account-generator'")
     if opts.os_tenant_name:
         LOG.warning("'os-tenant-name' and 'OS_TENANT_NAME' are both "
                     "deprecated, please use 'os-project-name' or "