[Pkg-mozext-commits] [adblock-plus] 377/464: Packager: Make sure to do all file manipulation before the package is signed

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:35 UTC 2014


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

taffit pushed a commit to branch master
in repository adblock-plus.

commit 582848d91fb797d2d874f38a9b6d2e32d214d0bc
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri May 3 13:24:31 2013 +0200

    Packager: Make sure to do all file manipulation before the package is signed
    
    --HG--
    extra : rebase_source : e79ccee8b54c5eea026b891bd9f3f92768d96436
---
 packager.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/packager.py b/packager.py
index ea89128..7191f9e 100644
--- a/packager.py
+++ b/packager.py
@@ -70,6 +70,11 @@ class Files(dict):
     self.ignoredFiles = ignoredFiles
     self.process = process
 
+  def __setitem__(self, key, value):
+    if self.process:
+      value = self.process(key, value)
+    dict.__setitem__(self, key, value)
+
   def isIncluded(self, relpath):
     parts = relpath.split('/')
     if not parts[0] in self.includedFiles:
@@ -111,10 +116,7 @@ class Files(dict):
     names = self.keys()
     names.sort(key=sortKey)
     for name in names:
-      data = self[name]
-      if self.process:
-        data = self.process(name, data)
-      zip.writestr(name, data)
+      zip.writestr(name, self[name])
     zip.close()
 
   def zipToString(self, sortKey=None):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list