From: Frank Brehm Date: Thu, 12 Apr 2018 11:06:06 +0000 (+0200) Subject: Changing debug output X-Git-Tag: 0.1.1~38 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=e2bfb04b5396273c7996f010e7ef6c76a72cdc7e;p=pixelpark%2Fcreate-vmware-tpl.git Changing debug output --- diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index ef3bdb4..7498ef8 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -37,7 +37,7 @@ from .obj import PpBaseObject from .config import CrTplConfiguration -__version__ = '0.6.4' +__version__ = '0.6.5' LOG = logging.getLogger(__name__) TZ = pytz.timezone('Europe/Berlin') @@ -644,7 +644,8 @@ class CrTplHandler(PpBaseObject): print('', flush=True) LOG.debug("Waiting for SSH available ...") - print(' ==> ', end='', flush=True) + if self.verbose <= 3: + print(' ==> ', end='', flush=True) addr_infos = socket.getaddrinfo( self.config.template_vm, 22, socket.AF_INET, socket.SOCK_STREAM) @@ -675,7 +676,7 @@ class CrTplHandler(PpBaseObject): cur_time = time.time() cur_duration = cur_time - self.ts_start_install if (cur_time - last_dot) >= self.interval_dot: - if self.verbose < 3: + if self.verbose <= 3: print('.', end='', flush=True) i += 1 if i >= 60: