|
|
|
@ -35,7 +35,18 @@ def dd_linux():
|
|
|
|
|
command = ['dd', input, output, "bs=1M", "oflag=sync"]
|
|
|
|
|
log("Executing ==> " + " ".join(command))
|
|
|
|
|
dd_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
|
|
|
|
|
pbar = progressbar.ProgressBar(maxval=100).start() # bar = progressbar.ProgressBar(redirect_stdout=True)
|
|
|
|
|
|
|
|
|
|
# bar = progressbar.ProgressBar(redirect_stdout=True)
|
|
|
|
|
pbar = progressbar.ProgressBar(
|
|
|
|
|
maxval=100,
|
|
|
|
|
widgets=[
|
|
|
|
|
' ',
|
|
|
|
|
progressbar.widgets.Bar(marker='=', left='[', right=']'),
|
|
|
|
|
' ',
|
|
|
|
|
progressbar.widgets.Percentage()
|
|
|
|
|
]
|
|
|
|
|
).start()
|
|
|
|
|
|
|
|
|
|
while dd_process.poll() is None:
|
|
|
|
|
time.sleep(1) # If this time delay is not given, the Popen does not execute the actual command
|
|
|
|
|
dd_process.send_signal(signal.SIGUSR1)
|
|
|
|
|