]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "Add teuthology git version query/logging" 903/head
authorZack Cerza <zack@cerza.org>
Thu, 7 Jul 2016 14:53:41 +0000 (08:53 -0600)
committerGitHub <noreply@github.com>
Thu, 7 Jul 2016 14:53:41 +0000 (08:53 -0600)
teuthology/__init__.py

index 935c01fa330bb3bef0ebf3e88148de99da37984e..d12e16349800fc2a0673ebc24bdfc0cc00cf2175 100644 (file)
@@ -14,20 +14,10 @@ monkey.patch_all()
 
 import logging
 import os
-import subprocess
 
-__version__ = '1.0.0'
 
-# do our best, but if it fails, continue with above
+__version__ = '0.1.0'
 
-try:
-    __version__ += '-' + subprocess.check_output(
-        'git rev-parse --short HEAD'.split(),
-        cwd=os.path.dirname(os.path.realpath(__file__))
-    ).strip()
-except Exception as e:
-    # before logging; should be unusual
-    print >>sys.stderr, 'Can\'t get version from git rev-parse', e
 
 # If we are running inside a virtualenv, ensure we have its 'bin' directory in
 # our PATH. This doesn't happen automatically if scripts are called without
@@ -48,8 +38,6 @@ logging.basicConfig(
     format='%(asctime)s.%(msecs)03d %(levelname)s:%(name)s:%(message)s')
 log = logging.getLogger(__name__)
 
-log.info('teuthology version: %s', __version__)
-
 
 def setup_log_file(log_path):
     root_logger = logging.getLogger()
@@ -66,4 +54,3 @@ def setup_log_file(log_path):
     handler = logging.FileHandler(filename=log_path)
     handler.setFormatter(formatter)
     root_logger.addHandler(handler)
-    root_logger.log.info('teuthology version: %s', __version__)