Changeset 391 for python/trunk/Lib/plat-mac/pimp.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/plat-mac/pimp.py
r2 r391 153 153 keepgoing = True 154 154 download = urllib2.urlopen(url) 155 if download.headers.has_key("content-length"):155 if 'content-length' in download.headers: 156 156 length = long(download.headers['content-length']) 157 157 else: … … 421 421 for p in packages: 422 422 p = dict(p) 423 if p.has_key('Download-URL'):423 if 'Download-URL' in p: 424 424 p['Download-URL'] = urllib.basejoin(url, p['Download-URL']) 425 425 flavor = p.get('Flavor') … … 553 553 554 554 rv = self._dict['Name'] 555 if self._dict.has_key('Version'):555 if 'Version' in self._dict: 556 556 rv = rv + '-%s' % self._dict['Version'] 557 if self._dict.has_key('Flavor'):557 if 'Flavor' in self._dict: 558 558 rv = rv + '-%s' % self._dict['Flavor'] 559 559 if self._dict.get('Flavor') == 'hidden': … … 648 648 else: 649 649 name = item['Name'] 650 if item.has_key('Version'):650 if 'Version' in item: 651 651 name = name + '-' + item['Version'] 652 if item.has_key('Flavor'):652 if 'Flavor' in item: 653 653 name = name + '-' + item['Flavor'] 654 654 pkg = self._db.find(name) … … 801 801 will receive a log of what happened.""" 802 802 803 if self._dict.has_key('Install-command'):803 if 'Install-command' in self._dict: 804 804 return "%s: Binary package cannot have Install-command" % self.fullname() 805 805 806 if self._dict.has_key('Pre-install-command'):806 if 'Pre-install-command' in self._dict: 807 807 if _cmd(output, '/tmp', self._dict['Pre-install-command']): 808 808 return "pre-install %s: running \"%s\" failed" % \ … … 837 837 self.afterInstall() 838 838 839 if self._dict.has_key('Post-install-command'):839 if 'Post-install-command' in self._dict: 840 840 if _cmd(output, '/tmp', self._dict['Post-install-command']): 841 841 return "%s: post-install: running \"%s\" failed" % \ … … 862 862 will receive a log of what happened.""" 863 863 864 if self._dict.has_key('Pre-install-command'):864 if 'Pre-install-command' in self._dict: 865 865 if _cmd(output, self._buildDirname, self._dict['Pre-install-command']): 866 866 return "pre-install %s: running \"%s\" failed" % \ … … 899 899 self.afterInstall() 900 900 901 if self._dict.has_key('Post-install-command'):901 if 'Post-install-command' in self._dict: 902 902 if _cmd(output, self._buildDirname, self._dict['Post-install-command']): 903 903 return "post-install %s: running \"%s\" failed" % \ … … 917 917 will receive a log of what happened.""" 918 918 919 if self._dict.has_key('Post-install-command'):919 if 'Post-install-command' in self._dict: 920 920 return "%s: Installer package cannot have Post-install-command" % self.fullname() 921 921 922 if self._dict.has_key('Pre-install-command'):922 if 'Pre-install-command' in self._dict: 923 923 if _cmd(output, '/tmp', self._dict['Pre-install-command']): 924 924 return "pre-install %s: running \"%s\" failed" % \
Note:
See TracChangeset
for help on using the changeset viewer.