| Index: packager.py | 
| =================================================================== | 
| --- a/packager.py | 
| +++ b/packager.py | 
| @@ -15,33 +15,28 @@ | 
| # You should have received a copy of the GNU General Public License | 
| # along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 
|  | 
| # Note: These are the base functions common to all packagers, the actual | 
| # packagers are implemented in packagerGecko and packagerChrome. | 
|  | 
| import sys, os, re, codecs, subprocess, json, zipfile, jinja2 | 
| from StringIO import StringIO | 
| -from ConfigParser import SafeConfigParser | 
| +from chainedconfigparser import ChainedConfigParser | 
|  | 
| import buildtools | 
|  | 
| def getDefaultFileName(baseDir, metadata, version, ext): | 
| return os.path.join(baseDir, '%s-%s.%s' % (metadata.get('general', 'basename'), version, ext)) | 
|  | 
| def getMetadataPath(baseDir): | 
| return os.path.join(baseDir, 'metadata') | 
|  | 
| def readMetadata(baseDir): | 
| -  metadata = SafeConfigParser() | 
| -  metadata.optionxform = str | 
| -  file = codecs.open(getMetadataPath(baseDir), 'rb', encoding='utf-8') | 
| -  metadata.readfp(file) | 
| -  file.close() | 
| -  return metadata | 
| +  return ChainedConfigParser(getMetadataPath(baseDir)) | 
|  | 
| def getBuildNum(baseDir): | 
| try: | 
| (result, dummy) = subprocess.Popen(['hg', 'id', '-R', baseDir, '-n'], stdout=subprocess.PIPE).communicate() | 
| return re.sub(r'\D', '', result) | 
| except Exception: | 
| return '0' | 
|  | 
|  |