[Python-checkins] python/dist/src/Lib/plat-mac pimp.py,1.12,1.13

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Tue, 11 Mar 2003 06:37:26 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv976

Modified Files:
	pimp.py 
Log Message:
Patch by Andrew Straw: use urllib2 so proxie access works.


Index: pimp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/pimp.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pimp.py	17 Feb 2003 12:21:05 -0000	1.12
--- pimp.py	11 Mar 2003 14:37:19 -0000	1.13
***************
*** 16,19 ****
--- 16,20 ----
  import os
  import urllib
+ import urllib2
  import urlparse
  import plistlib
***************
*** 50,58 ****
  ]
  
- class MyURLopener(urllib.FancyURLopener):
- 	"""Like FancyURLOpener, but we do want to get errors as exceptions."""
- 	def http_error_default(self, url, fp, errcode, errmsg, headers):
- 		urllib.URLopener.http_error_default(self, url, fp, errcode, errmsg, headers)
- 
  class PimpPreferences:
  	"""Container for per-user preferences, such as the database to use
--- 51,54 ----
***************
*** 150,154 ****
  			return
  		self._urllist.append(url)
! 		fp = MyURLopener().open(url).fp
  		dict = plistlib.Plist.fromFile(fp)
  		# Test here for Pimp version, etc
--- 146,150 ----
  			return
  		self._urllist.append(url)
! 		fp = urllib2.urlopen(url).fp
  		dict = plistlib.Plist.fromFile(fp)
  		# Test here for Pimp version, etc
***************
*** 799,801 ****
  	main()
  	
! 	
\ No newline at end of file
--- 795,797 ----
  	main()
  	
!