[diffoscope] 02/05: comparators.squashfs: Consistently use double-quotes in human-readable exception messages.

Chris Lamb chris at chris-lamb.co.uk
Thu Feb 2 03:51:24 CET 2017


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

lamby pushed a commit to branch master
in repository diffoscope.

commit 30e112c209b94c0eae407e3635187657cdb2e7ea
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Feb 2 14:38:31 2017 +1300

    comparators.squashfs: Consistently use double-quotes in human-readable exception messages.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/squashfs.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/diffoscope/comparators/squashfs.py b/diffoscope/comparators/squashfs.py
index 0283ee0..d46e746 100644
--- a/diffoscope/comparators/squashfs.py
+++ b/diffoscope/comparators/squashfs.py
@@ -77,7 +77,7 @@ class SquashfsRegularFile(SquashfsMember):
     def parse(line):
         m = SquashfsRegularFile.LINE_RE.match(line)
         if not m:
-            raise SquashfsInvalidLineFormat('invalid line format')
+            raise SquashfsInvalidLineFormat("invalid line format")
         return m.groupdict()
 
     def __init__(self, archive, member_name):
@@ -93,7 +93,7 @@ class SquashfsDirectory(Directory, SquashfsMember):
     def parse(line):
         m = SquashfsDirectory.LINE_RE.match(line)
         if not m:
-            raise SquashfsInvalidLineFormat('invalid line format')
+            raise SquashfsInvalidLineFormat("invalid line format")
         return m.groupdict()
 
     def __init__(self, archive, member_name):
@@ -107,7 +107,7 @@ class SquashfsDirectory(Directory, SquashfsMember):
 
     @property
     def path(self):
-        raise NotImplementedError('SquashfsDirectory is not meant to be extracted.')
+        raise NotImplementedError("SquashfsDirectory is not meant to be extracted.")
 
     def is_directory(self):
         return True
@@ -128,7 +128,7 @@ class SquashfsSymlink(Symlink, SquashfsMember):
     def parse(line):
         m = SquashfsSymlink.LINE_RE.match(line)
         if not m:
-            raise SquashfsInvalidLineFormat('invalid line format')
+            raise SquashfsInvalidLineFormat("invalid line format")
         return m.groupdict()
 
     def __init__(self, archive, member_name, destination):
@@ -156,21 +156,21 @@ class SquashfsDevice(Device, SquashfsMember):
     def parse(line):
         m = SquashfsDevice.LINE_RE.match(line)
         if not m:
-            raise SquashfsInvalidLineFormat('invalid line format')
+            raise SquashfsInvalidLineFormat("invalid line format")
         d = m.groupdict()
         try:
             d['mode'] = SquashfsDevice.KIND_MAP[d['kind']]
             del d['kind']
         except KeyError:
-            raise SquashfsInvalidLineFormat('unknown device kind %s' % d['kind'])
+            raise SquashfsInvalidLineFormat("unknown device kind %s" % d['kind'])
         try:
             d['major'] = int(d['major'])
         except ValueError:
-            raise SquashfsInvalidLineFormat('unable to parse major number %s' % d['major'])
+            raise SquashfsInvalidLineFormat("unable to parse major number %s" % d['major'])
         try:
             d['minor'] = int(d['minor'])
         except ValueError:
-            raise SquashfsInvalidLineFormat('unable to parse minor number %s' % d['minor'])
+            raise SquashfsInvalidLineFormat("unable to parse minor number %s" % d['minor'])
         return d
 
     def __init__(self, archive, member_name, mode, major, minor):
@@ -229,7 +229,7 @@ class SquashfsContainer(Archive):
     @tool_required('unsquashfs')
     def extract(self, member_name, dest_dir):
         if '..' in member_name.split('/'):
-            raise ValueError('relative path in squashfs')
+            raise ValueError("relative path in squashfs")
         cmd = ['unsquashfs', '-n', '-f', '-d', dest_dir, self.source.path, member_name]
         logger.debug("unsquashfs %s into %s", member_name, dest_dir)
         subprocess.check_call(cmd, shell=False, stdout=subprocess.PIPE)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list