summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Sachs <larry.j.sachs@intel.com>2015-01-07 09:26:33 -0800
committerLarry Sachs <larry.j.sachs@intel.com>2015-01-07 09:26:33 -0800
commitdcb5427ba7ac6bacbac0b95459da9504c1ec8865 (patch)
treef69d525d35099123bc514661a994cb41f0a925de
parenta050b01ddc15ee4cac16c62d8069e684fe5a40a4 (diff)
downloaddleyna-control-dcb5427ba7ac6bacbac0b95459da9504c1ec8865.tar.gz
script to launch app without proxy setting
-rwxr-xr-xsrc/launch-without-proxy-settings.py31
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]]);
+