diff options
Diffstat (limited to 'helpers')
-rw-r--r--[-rwxr-xr-x] | helpers/make_icon_link.txt.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/helpers/make_icon_link.txt.py b/helpers/make_icon_link.txt.py index e5ef3d2ee8..573af4050c 100755..100644 --- a/helpers/make_icon_link.txt.py +++ b/helpers/make_icon_link.txt.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - # # This file is part of the LibreOffice project. # @@ -18,14 +16,14 @@ try: file_icon = open(sys.argv[1], "r") except IOError: - print "There was an error reading", file_icon + print("There was an error reading", file_icon) sys.exit() try: # open file stream file_xsl = open(sys.argv[2], "w+") except IOError: - print "There was an error writing", file_xsl + print("There was an error writing", file_xsl) sys.exit() file_xsl.write('<?xml version="1.0" encoding="UTF-8"?>\n'); @@ -36,7 +34,7 @@ file_xsl.write('<xsl:choose>\n') for line in file_icon: if line[0] != "#" : - if line.find('png',0, len(line)) <> -1 : + if line.find('png',0, len(line)) != -1 : a = "\'" + line.split()[0] + "\'"; b = line.split()[1].replace(".png",".svg"); file_xsl.write('<xsl:when test="$src1=' + a + '"><xsl:text>'+ b + '</xsl:text></xsl:when>\n'); |