Skip to content

Commit

Permalink
Update filemanager.py
Browse files Browse the repository at this point in the history
revert python side changes
  • Loading branch information
meramsey authored Nov 23, 2023
1 parent b260a45 commit 739fcdf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions filemanager/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,6 @@ def changeOwner(self, path):
ProcessUtilities.executioner(command, website.externalApp)
except:
print("Permisson not changed")


def bytes_to_human_readable(num, suffix='B'):
for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
num /= 1024.0
return "%.1f%s%s" % (num, 'Yi', suffix)


def listForTable(self):
Expand Down Expand Up @@ -230,7 +222,7 @@ def listForTable(self):
if currentFile[0][0] == 'd':
dirCheck = 1

size = bytes_to_human_readable(int(currentFile[4]))
size = str(int(int(currentFile[4]) / float(1024)))
lastModified = currentFile[5] + ' ' + currentFile[6] + ' ' + currentFile[7]
finalData[str(counter)] = [currentFile[-1], currentFile[-1], lastModified, size, currentFile[0],
dirCheck]
Expand Down

0 comments on commit 739fcdf

Please sign in to comment.