[molecule.specs.plugins] image_plugin: save one function call by calling os.urandom() directly

This commit is contained in:
Fabio Erculiani
2010-08-08 23:50:02 +02:00
parent 0be6cc56d1
commit 59f241dcaa
+1 -1
View File
@@ -163,7 +163,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin):
while image_mb > 0:
image_mb -= 1
if self.randomize:
arr = array.array('c', molecule.utils.get_random_str(mb_bytes))
arr = array.array('c', os.urandom(mb_bytes))
else:
arr = array.array('c', chr(0)*mb_bytes)
arr.tofile(loop_f)