summaryrefslogtreecommitdiff
path: root/scripts/create_payload.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/create_payload.py')
-rwxr-xr-xscripts/create_payload.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/create_payload.py b/scripts/create_payload.py
deleted file mode 100755
index d051661..0000000
--- a/scripts/create_payload.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Create a payload file in disk to use during tests. Reads the name of the file
-and the intended size of the payload from the "defaults.conf" file:
-
- PAYLOAD = /path/to/payload/file
- PAYLOAD_SIZE = 500 # in Kb
-"""
-
-import os
-from ConfigParser import ConfigParser
-
-parser = ConfigParser()
-parser.read('defaults.conf')
-
-PAYLOAD = parser.get('sync', 'payload')
-PAYLOAD_SIZE = int(parser.get('sync', 'payload_size')) * 1024
-
-if os.path.isfile(PAYLOAD):
- os.unlink(PAYLOAD)
-
-content = 'a' * 1024
-
-with open(PAYLOAD, 'w') as f:
- length = 0
- while length < PAYLOAD_SIZE:
- f.write(content)
- length += len(content)