summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-16 21:32:09 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-16 21:32:09 +0100
commitad2f10b53b5f832c00a4d62b2e655c3268793001 (patch)
treed5b970967fedbf23bc7477c8ddc0961e6780a8af /tests
parentencoding fix (diff)
downloadpyload-ad2f10b53b5f832c00a4d62b2e655c3268793001.tar.xz
add os.stat before moveing dl
Diffstat (limited to 'tests')
-rw-r--r--tests/HosterPluginTester.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/HosterPluginTester.py b/tests/HosterPluginTester.py
index 8e18c3eb9..f4d2c4dc4 100644
--- a/tests/HosterPluginTester.py
+++ b/tests/HosterPluginTester.py
@@ -15,7 +15,7 @@ from helper.PluginTester import PluginTester
from module.PyFile import PyFile
from module.plugins.Base import Fail
from module.utils import accumulate
-from module.utils.fs import save_join, join, exists, listdir, remove
+from module.utils.fs import save_join, join, exists, listdir, remove, stat
DL_DIR = join("Downloads", "tmp")
@@ -73,9 +73,11 @@ class HosterPluginTester(PluginTester):
if hash.hexdigest() != self.files[pyfile.name]:
log(DEBUG, "Hash is %s" % hash.hexdigest())
-
- # Copy for debug report
- move(f.name, join("tmp", plugin, f.name))
+
+ size = stat(f.name).st_size
+ if size < 1024 * 1024 * 10: # 10MB
+ # Copy for debug report
+ move(f.name, join("tmp", plugin, f.name))
raise Exception("Hash does not match.")