peers_tab:display ?% instead of KeyError on progress

This commit is contained in:
Martijn Voncken 2008-04-25 16:37:25 +00:00
parent 62b713041a
commit a745178244
1 changed files with 5 additions and 0 deletions

View File

@ -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>