diff options
-rwxr-xr-x | src/launch-without-proxy-settings.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/launch-without-proxy-settings.py b/src/launch-without-proxy-settings.py new file mode 100755 index 0000000..fc09a6e --- /dev/null +++ b/src/launch-without-proxy-settings.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +# launches an app after first clearing proxy settings +# for example, launch-without-proxy-settings gupnp-av-cp + + +import os +import sys +from subprocess import call + + +try: + #print os.environ; + del os.environ["http_proxy"]; + del os.environ["https_proxy"]; + del os.environ["ftp_proxy"]; + del os.environ["socks_proxy"]; + del os.environ["no_proxy"]; + + print '\n'; + print '\n'; + + #print os.environ; +except Exception, e: + print e; + pass + +if len(sys.argv) >= 1: + print "launching " + sys.argv[1]; + call([sys.argv[1]]); + |