From: Frank Brehm Date: Wed, 11 Apr 2018 12:41:51 +0000 (+0200) Subject: Modifying output in wait_for_finish_install() X-Git-Tag: 0.1.1~48 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=42b8ab588284667c85f9a300878d70407c6cebf8;p=pixelpark%2Fcreate-vmware-tpl.git Modifying output in wait_for_finish_install() --- diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index 8d0afaf..0c20bfd 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -6,7 +6,7 @@ @copyright: © 2018 by Frank Brehm, Berlin @summary: A handler module for creating the VMWare template """ -from __future__ import absolute_import +from __future__ import absolute_import, print_function # Standard module import sys @@ -627,10 +627,10 @@ class CrTplHandler(PpBaseObject): time.sleep(self.interval_poll) cur_time = time.time() if (cur_time - last_dot) >= self.interval_dot: - sys.stdout.write('.') - sys.stdout.flush() + print('.', end='', flush=True) last_dot = cur_time cur_duration = cur_time - self.ts_start_install + print('', flush=True) # =============================================================================