Commit 97c02d22 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Pål Hermunn Johansen

Accommodate older python version

I'm looking at you, EL6.
parent 6ca37810
......@@ -39,6 +39,7 @@ import sys
import gzip
import StringIO
import collections
import struct
TYPES = [ "counter", "gauge", "bitmap" ]
CTYPES = [ "uint64_t" ]
......@@ -55,7 +56,9 @@ PARAMS = {
def gzip_str(s):
out = StringIO.StringIO()
gzip.GzipFile(fileobj=out, mode="w", mtime=0x12bfd58).write(s)
gzip.GzipFile(fileobj=out, mode="w").write(s)
out.seek(4)
out.write(struct.pack("<L", 0x12bfd58))
return out.getvalue()
def genhdr(fo, name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment