Comment 7 for bug 1098233

Revision history for this message
Jan Groenewald (jan-aims) wrote :

Actually, this piece of code seems to work fine
 # Get our proxy settings from the environment
 proxies = {}
 try:
  for proto in ('http','https','ftp'):
   try:
    proxies[proto] = os.environ[proto+"_proxy"]
   except KeyError:
    pass
  print proxies # my code

  if proxies:
   urllib._urlopener = urllib.FancyURLopener(proxies)
 except Exception:

and then the urllib.urlretrieve should work, and it does when run manually, but somehow not from the cron job. I can't see why.