[Pkg-privacy-commits] [tails-installer] 11/13: Detect dd error on an open file in Windows

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:28:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.95.0
in repository tails-installer.

commit 878f72c0de7ffa483462cad9c152c19c80342567
Author: Martin Bříza <m at rtinbriza.cz>
Date:   Fri Apr 29 10:48:51 2016 +0200

    Detect dd error on an open file in Windows
---
 liveusb/creator.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/liveusb/creator.py b/liveusb/creator.py
index b9fabac..33d5592 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -650,6 +650,11 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
             while dd.poll() is None:
                 buf = dd.stdout.readline().strip()
                 #buf = dd.stdout.read(256)
+                if "Error" in buf:
+                    if ": 32" in buf:
+                        raise LiveUSBError(_("The drive is being used by some other application"))
+                    else:
+                        raise LiveUSBError(buf)
                 r = re.search('^([,0-9]+)', buf)
                 if r and len(r.groups()) > 0 and len(r.group(0)) > 0:
                     ratio = float(float(r.group(0).replace(',', '')) / self.isosize)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list