diff options
author | Jean-François Paris <jfparis@rouge.eu.org> | 2021-02-21 14:53:22 +0300 |
---|---|---|
committer | Jean-François Paris <jfparis@rouge.eu.org> | 2021-02-21 21:38:38 +0300 |
commit | fb16b1ad9331397cdb47fd8c20f8df04d0f13176 (patch) | |
tree | 2eb92a575ac8eb5261332ae5adf12bc35906789d /fix-sln.py | |
parent | f84bdaf6f803f800419ecc72e5794456f7bf25dc (diff) |
Rewrote fix-sln to make it compatible with python2 (now unsupported) and python3
Diffstat (limited to 'fix-sln.py')
-rw-r--r-- | fix-sln.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fix-sln.py b/fix-sln.py index fc40d7dd5..4b74543ed 100644 --- a/fix-sln.py +++ b/fix-sln.py @@ -1,9 +1,10 @@ +#!/usr/bin/env python +from __future__ import print_function import re import io -f = open('Duplicati.sln') -c = f.read() -f.close() +with open('Duplicati.sln', 'r') as f: + c = f.read() p = re.compile(r"\{[0-9a-fA-F\-]*\}") @@ -19,4 +20,4 @@ for n in tags: for n in d: if d[n] > 7: - print n + print(n) |