summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-01 22:11:55 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-01 22:11:55 +0100
commitdad87afe2f73d6f456e9cb00b0d8ce7f5cee0140 (patch)
treee093ac6b486cf1f94d63ac2844c1276f68b916e4
parentdoc for crypter plugin (diff)
downloadpyload-dad87afe2f73d6f456e9cb00b0d8ce7f5cee0140.tar.xz
fix for huge (or wrong) sizes
-rw-r--r--module/utils/__init__.py2
-rwxr-xr-xpyLoadCore.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/module/utils/__init__.py b/module/utils/__init__.py
index 592bdbd7e..cdad1d222 100644
--- a/module/utils/__init__.py
+++ b/module/utils/__init__.py
@@ -66,7 +66,7 @@ def formatSize(size):
"""formats size of bytes"""
size = int(size)
steps = 0
- sizes = ["B", "KiB", "MiB", "GiB", "TiB"]
+ sizes = ("B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB")
while size > 1000:
size /= 1024.0
steps += 1
diff --git a/pyLoadCore.py b/pyLoadCore.py
index e79da3fc3..45feac1c3 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -198,6 +198,7 @@ class Core(object):
f = open(self.pidfile, "wb")
f.write(str(pid))
f.close()
+ chmod(self.pidfile, 0660)
def deletePidFile(self):
if self.checkPidFile():