[Pkg-privacy-commits] [tails-installer] 06/13: Move LiveUSBError to __init__couldn't be imported

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:28:05 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 6276c15b2eebf631688308b5867b8394b89594c8
Author: Martin Briza <mbriza at redhat.com>
Date:   Thu Apr 28 11:25:59 2016 +0200

    Move LiveUSBError to __init__couldn't be imported
---
 liveusb/__init__.py | 11 ++++++++++-
 liveusb/creator.py  | 12 +-----------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/liveusb/__init__.py b/liveusb/__init__.py
index 6409ff5..ef2c916 100644
--- a/liveusb/__init__.py
+++ b/liveusb/__init__.py
@@ -37,7 +37,16 @@ def utf8_gettext(string):
     " Translate string, converting it to a UTF-8 encoded bytestring "
     return _(string).encode('utf8')
 
-from liveusb.creator import LiveUSBError
+
+class LiveUSBError(Exception):
+    """ A generic error message that is thrown by the LiveUSBCreator """
+
+    def __init__(self, fullMessage, shortMessage=""):
+        self.args = [fullMessage]
+        if shortMessage != "":
+            self.short = shortMessage
+        else:
+            self.short = fullMessage
 
 if sys.platform == "win32":
     from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 40283de..d9a8472 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -36,20 +36,10 @@ from StringIO import StringIO
 from argparse import _AppendAction
 from stat import ST_SIZE
 
-from liveusb import _
+from liveusb import _, LiveUSBError
 from liveusb.releases import releases
 
 
-class LiveUSBError(Exception):
-    """ A generic error message that is thrown by the LiveUSBCreator """
-
-    def __init__(self, fullMessage, shortMessage=""):
-        self.args = [fullMessage]
-        if shortMessage != "":
-            self.short = shortMessage
-        else:
-            self.short = fullMessage
-
 
 class Drive(object):
     friendlyName = ''

-- 
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