summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-06-22 12:07:18 -0400
committerKali Kaneko <kali@leap.se>2015-06-22 15:03:57 -0400
commit8de9387861bbb2f450befa78f4343b0a294b96f2 (patch)
treed38c80d72e1935b972259b98627b4abfab65630f /src
parente214eff95c922f16b67e03a4eefd523835081297 (diff)
[feat] log lsb_release info if available
if the lsb_release utility is present on system, log part of its output so we can have more information about the platform bitmask is running on. - Resolves: #7162 - Releases: 0.9.0
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/app.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index ca7eb1d3..032a9e52 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -41,6 +41,7 @@
# (thanks to: http://www.glassgiant.com/ascii/)
import atexit
+import commands
import multiprocessing
import os
import sys
@@ -117,6 +118,17 @@ def do_mail_plumbing(opts):
# XXX catch when import is used w/o acct
+def log_lsb_release_info(logger):
+ """
+ Attempt to log distribution info from the lsb_release utility
+ """
+ if commands.getoutput('which lsb_release'):
+ distro_info = commands.getoutput('lsb_release -a').split('\n')[-4:]
+ logger.info("LSB Release info:")
+ for line in distro_info:
+ logger.info(line)
+
+
def start_app():
"""
Starts the main event loop and launches the main window.
@@ -180,6 +192,7 @@ def start_app():
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
logger.info('Bitmask version %s' % VERSION)
logger.info('leap.mail version %s' % MAIL_VERSION)
+ log_lsb_release_info(logger)
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
logger.info('Starting app')