aboutsummaryrefslogtreecommitdiffstats
path: root/helpers
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-15 22:11:53 +0200
committerficus <ficus@robocracy.org>2012-09-15 22:11:53 +0200
commit57a1e70dee45f5cd9493d6d23f8fc7b6435d5388 (patch)
tree24665ec2db4fcafb3b9890d2ac3c06d32f51569c /helpers
parent22c3233245584dd4b20a8b654f421d766688f3d1 (diff)
downloadtui-57a1e70dee45f5cd9493d6d23f8fc7b6435d5388.tar.gz
tui-57a1e70dee45f5cd9493d6d23f8fc7b6435d5388.zip
code style
Diffstat (limited to 'helpers')
-rw-r--r--helpers/__init__.py1
-rw-r--r--helpers/netif.py8
-rw-r--r--helpers/sysstatus.py2
-rw-r--r--helpers/tor.py3
4 files changed, 9 insertions, 5 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py
index e69de29..8b13789 100644
--- a/helpers/__init__.py
+++ b/helpers/__init__.py
@@ -0,0 +1 @@
+
diff --git a/helpers/netif.py b/helpers/netif.py
index 529444d..d8347a0 100644
--- a/helpers/netif.py
+++ b/helpers/netif.py
@@ -66,7 +66,7 @@ def parse_iw(ifname):
If the interface can not be found at all, raises a KeyError.
Example `iw dev wlan0 link` string (sic):
-
+
Connected to c0:25:06:51:22:9b (on wlan0)
SSID: fleischfressendepflanze
freq: 2427
@@ -212,7 +212,7 @@ def get_lan_settings(ifname='eth0'):
d = read_augeas_ifinfo(ifname)
return d
-def save_lan_settings(ifname='eth0'):
+def save_lan_settings(form, ifname='eth0'):
write_augeas_ifinfo(ifname, method=form['ipv4method'], settings=form)
if form['ipv4method'] == 'disabled':
print "ifdown..."
@@ -225,9 +225,9 @@ def save_lan_settings(ifname='eth0'):
def get_wifi_settings(ifname='wlan0'):
#d = read_augeas_ifinfo(ifname)
d = dict()
- if not d:
+ if not d:
return d
- d.update(dict()) # extra wireless settings
+ d.update(dict()) # extra wireless settings
return d
def save_wifi_settings(ifname='eth0'):
diff --git a/helpers/sysstatus.py b/helpers/sysstatus.py
index 99c209b..32caa26 100644
--- a/helpers/sysstatus.py
+++ b/helpers/sysstatus.py
@@ -80,7 +80,7 @@ def get_process_list():
Example ``ps aux`` output:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
- root 1 0.0 0.0 10636 676 ? Ss Sep08 0:05 init [2]
+ root 1 0.0 0.0 10636 676 ? Ss Sep08 0:05 init [2]
root 2 0.0 0.0 0 0 ? S Sep08 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Sep08 0:40 [ksoftirqd/0]
root 6 0.0 0.0 0 0 ? S Sep08 0:00 [migration/0]
diff --git a/helpers/tor.py b/helpers/tor.py
index d639ce2..ef585c5 100644
--- a/helpers/tor.py
+++ b/helpers/tor.py
@@ -3,13 +3,16 @@ Helper code for interacting with Tor and modifying the Tor system
configuration.
"""
+
def get_tor_status():
d = dict()
d['state'] = 'DISABLED'
return d
+
def get_tor_settings():
return dict()
+
def save_tor_settings():
pass