Skip to content

Commit

Permalink
#47 Reversed timestamp sorting on 'show downloads (live)'
Browse files Browse the repository at this point in the history
  • Loading branch information
PackeTsar committed Apr 11, 2020
1 parent aecee2f commit dbba62e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ztp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
##### https://github.com/packetsar/freeztp #####

##### Inform FreeZTP version here #####
version = "dev1.3.1d"
version = "dev1.3.1e"


##### Import native modules #####
Expand Down Expand Up @@ -2795,8 +2795,9 @@ def _format_lease(self, lease):
def show_downloads(self, args):
data = []
d = self.store.recall()
print(d)
dlist = list(d)
dlist.sort()
dlist.sort(reverse=True)
for dload in dlist:
data.append(d[dload])
return make_table([u'time', u'ipaddr', u'filename', u'filesize', u'bytessent', u'percent', u'rate', u'active'], data)
Expand Down Expand Up @@ -2889,7 +2890,7 @@ def get_live_status(self, client):
d = client.recv(100000)
d = json.loads(d)
dlist = list(d)
dlist.sort()
dlist.sort(reverse=True)
for dload in dlist:
data.append(d[dload])
return make_table([u'time', u'ipaddr', u'filename', u'filesize', u'bytessent', u'percent', u'rate', u'active'], data)
Expand Down

0 comments on commit dbba62e

Please sign in to comment.