Only check path.size if file.
Now that pathclass returns size for dirs as well, but that's not necessary here.
This commit is contained in:
parent
f4dab12bf1
commit
5022257817
1 changed files with 3 additions and 4 deletions
|
@ -362,11 +362,10 @@ def read_filebytes(path, range_min=None, range_max=None):
|
|||
|
||||
def table_row(path, display_name=None, shaded=False):
|
||||
form = '<tr style="background-color:#{bg}"><td style="">{anchor}</td><td>{size}</td></tr>'
|
||||
size = path.size
|
||||
if size is None:
|
||||
size = ''
|
||||
if path.is_file:
|
||||
size = bytestring.bytestring(path.size)
|
||||
else:
|
||||
size = bytestring.bytestring(size)
|
||||
size = ''
|
||||
|
||||
bg = 'ddd' if shaded else 'fff'
|
||||
|
||||
|
|
Loading…
Reference in a new issue