[diffoscope] 03/05: comparators.apk: Move utility method to end of file
Chris Lamb
chris at chris-lamb.co.uk
Mon Jan 9 12:32:17 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 c869df05222f3f72c68c5f342ed91d0f8c9e25a7
Author: Chris Lamb <lamby at debian.org>
Date: Mon Jan 9 11:25:54 2017 +0000
comparators.apk: Move utility method to end of file
Gbp-Dch: Ignore
Signed-off-by: Chris Lamb <lamby at debian.org>
---
diffoscope/comparators/apk.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/diffoscope/comparators/apk.py b/diffoscope/comparators/apk.py
index 38fd3bc..2f2757a 100644
--- a/diffoscope/comparators/apk.py
+++ b/diffoscope/comparators/apk.py
@@ -33,18 +33,6 @@ from .zip import Zipinfo, ZipinfoVerbose
logger = logging.getLogger(__name__)
-def filter_apk_metadata(filepath, archive_name):
- new_filename = os.path.join(os.path.split(filepath)[0], "APK metadata")
- logger.debug("Moving APK metadata from %s to %s", filepath, new_filename)
- with open(filepath) as f:
- with open(new_filename, "w") as f_out:
- for line in f:
- if not re.match(r'^apkFileName: %s' % os.path.basename(archive_name), line):
- f_out.write(line)
- os.remove(filepath)
- return new_filename
-
-
class ApkContainer(Archive):
@property
def path(self):
@@ -100,3 +88,15 @@ class ApkFile(File):
zipinfo_difference = Difference.from_command(Zipinfo, self.path, other.path) or \
Difference.from_command(ZipinfoVerbose, self.path, other.path)
return [zipinfo_difference]
+
+
+def filter_apk_metadata(filepath, archive_name):
+ new_filename = os.path.join(os.path.split(filepath)[0], "APK metadata")
+ logger.debug("Moving APK metadata from %s to %s", filepath, new_filename)
+ with open(filepath) as f:
+ with open(new_filename, "w") as f_out:
+ for line in f:
+ if not re.match(r'^apkFileName: %s' % os.path.basename(archive_name), line):
+ f_out.write(line)
+ os.remove(filepath)
+ return new_filename
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list