summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-10 20:59:00 +0000
committerGerrit Code Review <review@openstack.org>2016-03-10 20:59:00 +0000
commit630ba7fad2c0c3352ff53549a7f08d78a9541305 (patch)
tree7513d6e23eea646880498e7240671fe0392f14b9
parent34fe9cc284707428d14cf0b8c8ecdfe89804e451 (diff)
parentad3cc21c67a26fe687fa6c48f6ffdf1e728cdf24 (diff)
Merge "Switch use of cStringIO.StringIO to io.BytesIO"
-rw-r--r--files/subunit-gearman-worker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/subunit-gearman-worker.py b/files/subunit-gearman-worker.py
index 5780f8d..74efd42 100644
--- a/files/subunit-gearman-worker.py
+++ b/files/subunit-gearman-worker.py
@@ -15,10 +15,10 @@
15# under the License. 15# under the License.
16 16
17import argparse 17import argparse
18import cStringIO
19import daemon 18import daemon
20import gear 19import gear
21import gzip 20import gzip
21import io
22import json 22import json
23import logging 23import logging
24import os 24import os
@@ -121,14 +121,14 @@ class SubunitRetriever(threading.Thread):
121 return None 121 return None
122 if gzipped: 122 if gzipped:
123 logging.debug("Decompressing gzipped source file.") 123 logging.debug("Decompressing gzipped source file.")
124 raw_strIO = cStringIO.StringIO(raw_buf) 124 raw_strIO = io.BytesIO(raw_buf)
125 f = gzip.GzipFile(fileobj=raw_strIO) 125 f = gzip.GzipFile(fileobj=raw_strIO)
126 buf = cStringIO.StringIO(f.read()) 126 buf = io.BytesIO(f.read())
127 raw_strIO.close() 127 raw_strIO.close()
128 f.close() 128 f.close()
129 else: 129 else:
130 logging.debug("Decoding source file.") 130 logging.debug("Decoding source file.")
131 buf = cStringIO.StringIO(raw_buf) 131 buf = io.BytesIO(raw_buf)
132 return buf 132 return buf
133 133
134 def _get_subunit_data(self, source_url, retry): 134 def _get_subunit_data(self, source_url, retry):