qubes-bug-report coding style 4 spaces instead of tabs and using += operator
This commit is contained in:
parent
ea7631208c
commit
14efbb4a22
@ -52,13 +52,13 @@ def get_qube_packages( qube_name ):
|
||||
try:
|
||||
out = subprocess.check_output([ 'qvm-run', qube_name, '--pass-io', '--no-color-output', pkg_list_cmd ], stderr = open( os.devnull, 'w' ) )
|
||||
out = out.decode('utf-8')
|
||||
content = content + create_heading( ( "Package Manager: " + package_manager ), 3 )
|
||||
content = content + wrap_code( out )
|
||||
content += create_heading( ( "Package Manager: " + package_manager ), 3 )
|
||||
content += wrap_code( out )
|
||||
except subprocess.CalledProcessError:
|
||||
pass #do nothing
|
||||
|
||||
else:
|
||||
content = content + "**No packages listed, because Qube " + qube_name + " was not running**\n\n"
|
||||
content += "**No packages listed, because Qube " + qube_name + " was not running**\n\n"
|
||||
|
||||
return content
|
||||
|
||||
@ -67,7 +67,7 @@ def get_dom0_packages():
|
||||
content = create_heading( "Dom0 Packages", 2 )
|
||||
out = subprocess.check_output([ "rpm", "-qa", "qubes-*" ])
|
||||
out = out.decode('utf-8')
|
||||
content = content + wrap_code( out )
|
||||
content += wrap_code( out )
|
||||
|
||||
return content
|
||||
|
||||
@ -98,10 +98,11 @@ def get_log_file_content( qube_name ):
|
||||
|
||||
log_prefix = [ "guid", "pacat", "qubesdb", "qrexec" ]
|
||||
|
||||
#constructs for each log file prefix the full path and reads the log file
|
||||
for prefix in log_prefix:
|
||||
log_file = prefix + "." + qube_name + ext
|
||||
content = content + create_heading( ( "Log File: " + log_file ), 3 )
|
||||
content = content + wrap_code( get_log_file( qubes_os_log + log_file ) )
|
||||
content += create_heading( ( "Log File: " + log_file ), 3 )
|
||||
content += wrap_code( get_log_file( qubes_os_log + log_file ) )
|
||||
|
||||
return content
|
||||
|
||||
@ -111,7 +112,7 @@ def get_qube_prefs( qube_name ):
|
||||
qube_prefs = qube_prefs.decode('utf-8')
|
||||
|
||||
content = create_heading( "Qube Prefs", 2 )
|
||||
content = content + wrap_code( qube_prefs )
|
||||
content += wrap_code( qube_prefs )
|
||||
|
||||
return content
|
||||
|
||||
@ -124,9 +125,9 @@ def report( qube_name ):
|
||||
title_text = create_heading( "Bug report: " + qube_name, 1 )
|
||||
|
||||
content_text = get_qube_prefs( qube_name )
|
||||
content_text = content_text + get_dom0_packages()
|
||||
content_text = content_text + get_log_file_content( qube_name )
|
||||
content_text = content_text + get_qube_packages( qube_name )
|
||||
content_text += get_dom0_packages()
|
||||
content_text += get_log_file_content( qube_name )
|
||||
content_text += get_qube_packages( qube_name )
|
||||
|
||||
|
||||
report = template.format( title=title_text, content=content_text )
|
||||
|
Loading…
Reference in New Issue
Block a user