peers_tab:display ?% instead of KeyError on progress
This commit is contained in:
parent
62b713041a
commit
a745178244
|
@ -20,11 +20,16 @@ $for peer in torrent.peers:
|
||||||
<td>$peer['country']</td>
|
<td>$peer['country']</td>
|
||||||
<td>$peer['client']</td>
|
<td>$peer['client']</td>
|
||||||
<td class="progress_bar">
|
<td class="progress_bar">
|
||||||
|
$if peer.get('progress'):
|
||||||
<div class="progress_bar_outer">
|
<div class="progress_bar_outer">
|
||||||
<div class="progress_bar" style="width:$(peer['progress'])%;overflow:hidden">
|
<div class="progress_bar" style="width:$(peer['progress'])%;overflow:hidden">
|
||||||
$int(peer['progress']) %
|
$int(peer['progress']) %
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
$else:
|
||||||
|
<div class="progress_bar_outer">
|
||||||
|
? %
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue