diff --git a/image_creator/dialog_wizard.py b/image_creator/dialog_wizard.py
index 8e122a8407acac2585ead8f81452604e755f5c00..e26975ea57f8e70f0caf6e01e8f42862ed9eab9f 100644
--- a/image_creator/dialog_wizard.py
+++ b/image_creator/dialog_wizard.py
@@ -177,7 +177,7 @@ def extract_image(session):
device.out = out
image_os.out = out
- out.output()
+ out.clear()
#Sysprep
device.mount(False)
diff --git a/image_creator/output/__init__.py b/image_creator/output/__init__.py
index 99653d315a48350b264a08c770edf603e87ee6e2..3992846394939be20dce463899d6196cfbd932ae 100644
--- a/image_creator/output/__init__.py
+++ b/image_creator/output/__init__.py
@@ -48,6 +48,9 @@ class Output(object):
def cleanup(self):
pass
+ def clear(self):
+ pass
+
def _get_progress(self):
progress = self._Progress
progress.output = self
diff --git a/image_creator/output/cli.py b/image_creator/output/cli.py
index c7b5a55b5bd71c1e0b62bc7893f84f53abe39b5f..37022d59bcdac04c86155e5ad56daf559f296117 100644
--- a/image_creator/output/cli.py
+++ b/image_creator/output/cli.py
@@ -58,6 +58,12 @@ def success(msg, new_line=True, colored=True):
output(msg, new_line, color)
+def clear():
+ #clear the page
+ if sys.stderr.isatty():
+ sys.stderr.write('\033[H\033[2J')
+
+
class SilentOutput(Output):
pass
@@ -78,6 +84,9 @@ class SimpleOutput(Output):
def output(self, msg='', new_line=True):
output(msg, new_line)
+ def clear(self):
+ clear()
+
class OutputWthProgress(SimpleOutput):
class _Progress(Bar):