From 60acda0bcee206d922b5e4a11e2dadf1d050ccea Mon Sep 17 00:00:00 2001 From: guoci Date: Thu, 27 Jul 2017 17:02:01 -0400 Subject: [PATCH] make script version agnostic --- scripts/MakeHeader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py index a9a5f205..4841bdac 100755 --- a/scripts/MakeHeader.py +++ b/scripts/MakeHeader.py @@ -2,8 +2,11 @@ import os, sys, string try: from cStringIO import StringIO -except: - from StringIO import StringIO +except ImportError: + try: + from StringIO import StringIO + except ImportError: + from io import StringIO ANY=1 COPY=2