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):
|
def table_row(path, display_name=None, shaded=False):
|
||||||
form = '<tr style="background-color:#{bg}"><td style="">{anchor}</td><td>{size}</td></tr>'
|
form = '<tr style="background-color:#{bg}"><td style="">{anchor}</td><td>{size}</td></tr>'
|
||||||
size = path.size
|
if path.is_file:
|
||||||
if size is None:
|
size = bytestring.bytestring(path.size)
|
||||||
size = ''
|
|
||||||
else:
|
else:
|
||||||
size = bytestring.bytestring(size)
|
size = ''
|
||||||
|
|
||||||
bg = 'ddd' if shaded else 'fff'
|
bg = 'ddd' if shaded else 'fff'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue