Reformat and optimize code, including trailing whitespace and end of file newline.

This commit is contained in:
Mike Auty
2014-06-10 15:40:50 +01:00
parent 2222dd546a
commit a97bd19988
22 changed files with 187 additions and 125 deletions
+6 -6
View File
@@ -1,10 +1,9 @@
from framework.renderers import FormatSpecification
__author__ = 'mike'
import sys
from volatility.framework.interfaces import renderers as interface
from volatility.framework import renderers
import sys
class TextRenderer(interface.Renderer):
@@ -40,8 +39,9 @@ class TextRenderer(interface.Renderer):
# Then print out the headers and the values at their appropriate spacings
# Potentially warn if the output is likely to be longer than the display area.
headers = [("{0:" + FormatSpecification(width = column_maximum_widths[column.index], fill = ' ',
align = '^').to_string() + "}").format(column.name) for column in
headers = [("{0:" + renderers.FormatSpecification(width = column_maximum_widths[column.index], fill = ' ',
align = '^').to_string() + "}").format(column.name) for column
in
grid.columns]
print(sep.join(headers))
@@ -50,4 +50,4 @@ class TextRenderer(interface.Renderer):
for column in grid.columns:
row_text.append(("{:" + column.format.to_string() + "}").format(row.values[column.index]))
line = sep.join(row_text)
sys.stdout.write(line + "\n")
sys.stdout.write(line + "\n")