~rescuetime-developers/rescuetime-linux-uploader/trunk

« back to all changes in this revision

Viewing changes to RescueTimeUploader/uploader.py

Don't see any issues with it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
RESCUETIME_API_URL = "https://api.rescuetime.com/api/"
31
31
 
32
 
if os.getenv('http_proxy') != None:
33
 
        proxy_url = os.getenv('http_proxy') 
34
 
        proxy_support = urllib2.ProxyHandler({'http': proxy_url})
 
32
if os.getenv('http_proxy') != None or os.getenv('https_proxy') != None:
 
33
        proxy_support = urllib2.ProxyHandler()
35
34
        opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler)
36
35
        urllib2.install_opener(opener)
37
36