From 4263cf74efbe5cceb6051378a7a4c16cfcaa05d8 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sat, 10 Nov 2018 11:28:21 +0100 Subject: check-license-headers Python 2 compatible --- buildtools/check_license_headers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildtools/check_license_headers.py b/buildtools/check_license_headers.py index 7e05fa9f5..c7cb3d9f7 100755 --- a/buildtools/check_license_headers.py +++ b/buildtools/check_license_headers.py @@ -4,6 +4,8 @@ # Author: Max Gaukler # Licensed under GPL version 2 or any later version, read the file "COPYING" for more information. +from __future__ import print_function + import fnmatch import os import sys @@ -11,6 +13,9 @@ import subprocess license = {} hasSPDX = {} +if sys.version_info[0] < 3: + from io import open + # do not check licenses in these subdirectories: # TODO: have look at the libraries' licenses IGNORE_PATHS = [ -- cgit v1.2.3