Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/plat-mac/pimp.py

    r2 r391  
    153153        keepgoing = True
    154154        download = urllib2.urlopen(url)
    155         if download.headers.has_key("content-length"):
     155        if 'content-length' in download.headers:
    156156            length = long(download.headers['content-length'])
    157157        else:
     
    421421        for p in packages:
    422422            p = dict(p)
    423             if p.has_key('Download-URL'):
     423            if 'Download-URL' in p:
    424424                p['Download-URL'] = urllib.basejoin(url, p['Download-URL'])
    425425            flavor = p.get('Flavor')
     
    553553
    554554        rv = self._dict['Name']
    555         if self._dict.has_key('Version'):
     555        if 'Version' in self._dict:
    556556            rv = rv + '-%s' % self._dict['Version']
    557         if self._dict.has_key('Flavor'):
     557        if 'Flavor' in self._dict:
    558558            rv = rv + '-%s' % self._dict['Flavor']
    559559        if self._dict.get('Flavor') == 'hidden':
     
    648648            else:
    649649                name = item['Name']
    650                 if item.has_key('Version'):
     650                if 'Version' in item:
    651651                    name = name + '-' + item['Version']
    652                 if item.has_key('Flavor'):
     652                if 'Flavor' in item:
    653653                    name = name + '-' + item['Flavor']
    654654                pkg = self._db.find(name)
     
    801801        will receive a log of what happened."""
    802802
    803         if self._dict.has_key('Install-command'):
     803        if 'Install-command' in self._dict:
    804804            return "%s: Binary package cannot have Install-command" % self.fullname()
    805805
    806         if self._dict.has_key('Pre-install-command'):
     806        if 'Pre-install-command' in self._dict:
    807807            if _cmd(output, '/tmp', self._dict['Pre-install-command']):
    808808                return "pre-install %s: running \"%s\" failed" % \
     
    837837        self.afterInstall()
    838838
    839         if self._dict.has_key('Post-install-command'):
     839        if 'Post-install-command' in self._dict:
    840840            if _cmd(output, '/tmp', self._dict['Post-install-command']):
    841841                return "%s: post-install: running \"%s\" failed" % \
     
    862862        will receive a log of what happened."""
    863863
    864         if self._dict.has_key('Pre-install-command'):
     864        if 'Pre-install-command' in self._dict:
    865865            if _cmd(output, self._buildDirname, self._dict['Pre-install-command']):
    866866                return "pre-install %s: running \"%s\" failed" % \
     
    899899        self.afterInstall()
    900900
    901         if self._dict.has_key('Post-install-command'):
     901        if 'Post-install-command' in self._dict:
    902902            if _cmd(output, self._buildDirname, self._dict['Post-install-command']):
    903903                return "post-install %s: running \"%s\" failed" % \
     
    917917        will receive a log of what happened."""
    918918
    919         if self._dict.has_key('Post-install-command'):
     919        if 'Post-install-command' in self._dict:
    920920            return "%s: Installer package cannot have Post-install-command" % self.fullname()
    921921
    922         if self._dict.has_key('Pre-install-command'):
     922        if 'Pre-install-command' in self._dict:
    923923            if _cmd(output, '/tmp', self._dict['Pre-install-command']):
    924924                return "pre-install %s: running \"%s\" failed" % \
Note: See TracChangeset for help on using the changeset viewer.