aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-11 17:56:17 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-11 17:56:17 +1200
commit5b9f07c81c0dcc8c7b3d7afdeae8f6229ebf8622 (patch)
tree854564b30ea2bc3474d1cfd33feb8c862244db18 /netlib
parente367b8819569a7811d2625a2b59610b508e8175c (diff)
downloadmitmproxy-5b9f07c81c0dcc8c7b3d7afdeae8f6229ebf8622.tar.gz
mitmproxy-5b9f07c81c0dcc8c7b3d7afdeae8f6229ebf8622.tar.bz2
mitmproxy-5b9f07c81c0dcc8c7b3d7afdeae8f6229ebf8622.zip
debug.sysinfo: tests and coverage
Diffstat (limited to 'netlib')
-rw-r--r--netlib/debug.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/netlib/debug.py b/netlib/debug.py
index ca25b828..bf446eb0 100644
--- a/netlib/debug.py
+++ b/netlib/debug.py
@@ -12,15 +12,18 @@ def sysinfo():
"Platform: %s"%platform.platform(),
]
d = platform.linux_distribution()
- if d[0]:
- data.append("Linux distro: %s %s %s"%d)
+ t = "Linux distro: %s %s %s"%d
+ if d[0]: # pragma: no-cover
+ data.append(t)
d = platform.mac_ver()
- if d[0]:
- data.append("Mac version: %s %s %s"%d)
+ t = "Mac version: %s %s %s"%d
+ if d[0]: # pragma: no-cover
+ data.append(t)
d = platform.win32_ver()
- if d[0]:
- data.append("Windows version: %s %s %s %s"%d)
+ t = "Windows version: %s %s %s %s"%d
+ if d[0]: # pragma: no-cover
+ data.append(t)
return "\n".join(data)