diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 17:08:29 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 17:08:29 +0100 |
commit | 1de45d9f4f2a39e205dd99e0dcf8b0c323537fea (patch) | |
tree | b83d12fd13a27d798326d8a5e2fda136cab009e4 /pyload/plugins/internal/SimpleHoster.py | |
parent | Bucket and CookieJar from 0.5.0 (diff) | |
download | pyload-1de45d9f4f2a39e205dd99e0dcf8b0c323537fea.tar.xz |
Spare code cosmetics
Diffstat (limited to 'pyload/plugins/internal/SimpleHoster.py')
-rw-r--r-- | pyload/plugins/internal/SimpleHoster.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyload/plugins/internal/SimpleHoster.py b/pyload/plugins/internal/SimpleHoster.py index af8a53534..d04044830 100644 --- a/pyload/plugins/internal/SimpleHoster.py +++ b/pyload/plugins/internal/SimpleHoster.py @@ -10,7 +10,7 @@ from pyload.datatype.PyFile import statusMap as _statusMap from pyload.network.CookieJar import CookieJar from pyload.network.RequestFactory import getURL from pyload.plugins.Hoster import Hoster -from pyload.utils import fixup, parseFileSize +from pyload.utils import fixup, formatSize, parseFileSize #@TODO: Adapt and move to PyFile in 0.4.10 @@ -523,9 +523,8 @@ class SimpleHoster(Hoster): elif traffic == -1: return True else: - size = self.pyfile.size / 1024 - self.logInfo(_("Filesize: %i KiB, Traffic left for user %s: %i KiB") % (size, self.user, traffic)) - return size <= traffic + self.logInfo(_("Filesize: %s, Traffic left for user %s: %s") % (formatSize(size), self.user, formatSize(traffic))) + return self.pyfile.size <= traffic def error(self, reason="", type="parse"): |