[Pkg-privacy-commits] [tails-installer] 20/30: Implement a comparison operator for Drive

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:27:10 UTC 2017


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

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

commit 27004c1465a9ad26b9410f68102c79340e184b48
Author: Martin Bříza <m at rtinbriza.cz>
Date:   Tue Apr 5 16:30:32 2016 +0200

    Implement a comparison operator for Drive
---
 liveusb/creator.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/liveusb/creator.py b/liveusb/creator.py
index ec95f18..e22103e 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -58,6 +58,16 @@ class Drive(object):
     mount = []
     isIso9660 = False
 
+    def __eq__(self, other):
+        return (isinstance(other, self.__class__)
+            and self.friendlyName == other.friendlyName
+            and self.size == other.size
+            and self.type == other.type
+            and self.isIso9660 == other.isIso9660)
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
 
 class LiveUSBCreator(object):
     """ An OS-independent parent class for Live USB Creators """

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