summaryrefslogtreecommitdiffstats
path: root/chrome/tools/extensions
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
commitf0a51fb571f46531025fa09240bbc3e1af925e84 (patch)
tree558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /chrome/tools/extensions
parent6390be368205705f49ead3cec40396519f13b889 (diff)
downloadchromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/extensions')
-rwxr-xr-xchrome/tools/extensions/chromium_extension.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/tools/extensions/chromium_extension.py b/chrome/tools/extensions/chromium_extension.py
index 4431b34..81e4662 100755
--- a/chrome/tools/extensions/chromium_extension.py
+++ b/chrome/tools/extensions/chromium_extension.py
@@ -56,7 +56,7 @@ class ExtensionDir:
f = open(os.path.join(self._root, MANIFEST_FILENAME))
manifest = json.load(f)
f.close()
-
+
zip_path = path + ".zip"
if os.path.exists(zip_path):
os.remove(zip_path)
@@ -68,7 +68,7 @@ class ExtensionDir:
logging.debug("%s: %s" % (arcname, file))
zip.write(file, arcname)
zip.close()
-
+
zip = open(zip_path, mode="rb")
hash = hashlib.sha256()
while True:
@@ -77,11 +77,11 @@ class ExtensionDir:
break
hash.update(buf)
zip.close()
-
+
manifest["zip_hash"] = hash.hexdigest()
# This is a bit odd - we're actually appending a new zip file to the end
- # of the manifest. Believe it or not, this is actually an explicit
+ # of the manifest. Believe it or not, this is actually an explicit
# feature of the zip format, and many zip utilities (this library
# and three others I tried) can still read the underlying zip file.
if os.path.exists(path):
@@ -105,7 +105,7 @@ class ExtensionDir:
out.write(buf)
zip.close()
out.close()
-
+
os.remove(zip_path)
logging.info("created extension package %s" % path)
@@ -136,7 +136,7 @@ class ExtensionPackage:
def Run():
logging.basicConfig(level=logging.INFO, format="[%(levelname)s] %(message)s")
-
+
parser = optparse.OptionParser("usage: %prog --indir=<dir> --outfile=<file>")
parser.add_option("", "--indir",
help="an input directory where the extension lives")