Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: packagerGecko.py

Issue 29345279: Noissue - Adapt quotes for compliance with our coding style in buildtools (Closed)
Patch Set: Created May 29, 2016, 1:27 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packagerChrome.py ('k') | publicSuffixListUpdater.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import re 7 import re
8 import hashlib 8 import hashlib
9 import base64 9 import base64
10 import urllib 10 import urllib
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 mime = M2Crypto.SMIME.SMIME() 330 mime = M2Crypto.SMIME.SMIME()
331 mime.load_key(keyFile) 331 mime.load_key(keyFile)
332 mime.set_x509_stack(stack) 332 mime.set_x509_stack(stack)
333 signature = mime.sign(M2Crypto.BIO.MemoryBuffer(files['META-INF/zigbert.sf'] .encode('utf-8')), M2Crypto.SMIME.PKCS7_DETACHED | M2Crypto.SMIME.PKCS7_BINARY) 333 signature = mime.sign(M2Crypto.BIO.MemoryBuffer(files['META-INF/zigbert.sf'] .encode('utf-8')), M2Crypto.SMIME.PKCS7_DETACHED | M2Crypto.SMIME.PKCS7_BINARY)
334 334
335 buffer = M2Crypto.BIO.MemoryBuffer() 335 buffer = M2Crypto.BIO.MemoryBuffer()
336 signature.write_der(buffer) 336 signature.write_der(buffer)
337 files['META-INF/zigbert.rsa'] = buffer.read() 337 files['META-INF/zigbert.rsa'] = buffer.read()
338 338
339 339
340 def createBuild(baseDir, type="gecko", outFile=None, locales=None, buildNum=None , releaseBuild=False, keyFile=None, multicompartment=False): 340 def createBuild(baseDir, type='gecko', outFile=None, locales=None, buildNum=None , releaseBuild=False, keyFile=None, multicompartment=False):
341 if locales == None: 341 if locales == None:
342 locales = getLocales(baseDir) 342 locales = getLocales(baseDir)
343 elif locales == 'all': 343 elif locales == 'all':
344 locales = getLocales(baseDir, True) 344 locales = getLocales(baseDir, True)
345 345
346 metadata = readMetadata(baseDir, type) 346 metadata = readMetadata(baseDir, type)
347 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) 347 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum)
348 348
349 if outFile == None: 349 if outFile == None:
350 outFile = getDefaultFileName(metadata, version, 'xpi') 350 outFile = getDefaultFileName(metadata, version, 'xpi')
(...skipping 30 matching lines...) Expand all
381 files.preprocess([f for f, _ in metadata.items('preprocess')]) 381 files.preprocess([f for f, _ in metadata.items('preprocess')])
382 if keyFile: 382 if keyFile:
383 signFiles(files, keyFile) 383 signFiles(files, keyFile)
384 files.zip(outFile, sortKey=lambda x: '!' if x == 'META-INF/zigbert.rsa' else x) 384 files.zip(outFile, sortKey=lambda x: '!' if x == 'META-INF/zigbert.rsa' else x)
385 385
386 386
387 def autoInstall(baseDir, type, host, port, multicompartment=False): 387 def autoInstall(baseDir, type, host, port, multicompartment=False):
388 fileBuffer = StringIO() 388 fileBuffer = StringIO()
389 createBuild(baseDir, type=type, outFile=fileBuffer, multicompartment=multico mpartment) 389 createBuild(baseDir, type=type, outFile=fileBuffer, multicompartment=multico mpartment)
390 urllib.urlopen('http://%s:%s/' % (host, port), data=fileBuffer.getvalue()) 390 urllib.urlopen('http://%s:%s/' % (host, port), data=fileBuffer.getvalue())
OLDNEW
« no previous file with comments | « packagerChrome.py ('k') | publicSuffixListUpdater.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld