]> git.llucax.com Git - software/pymin.git/blobdiff - config.py
Make procman.ProcessManager.restart(p) update pidmap when p was running.
[software/pymin.git] / config.py
index 7a9b60452ddeb6cef41be1a2c78e9a6b5121d8d5..aae79c185fa02ae0783d5e5828de3d46bc29f95c 100644 (file)
--- a/config.py
+++ b/config.py
@@ -20,9 +20,12 @@ config_path = join(base_path, 'config')
 class Root(Handler):
 
     def __init__(self):
-        f = file("/proc/sys/net/ipv4/ip_forward","w")
-        f.write("1")
-        f.close()
+        try:
+            f = file("/proc/sys/net/ipv4/ip_forward","w")
+            f.write("1")
+            f.close()
+        except (IOError, OSError), e:
+            print "Can't set ip_forward:", e
         #self.ip.device_up_hook(self.dns)
 
     firewall = FirewallHandler(