diff --git a/scripts/python/check-patchhdr b/scripts/python/check-patchhdr index 0f8f89e..165eae2 100755 --- a/scripts/python/check-patchhdr +++ b/scripts/python/check-patchhdr @@ -1,9 +1,5 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*-, - -from __future__ import absolute_import -from __future__ import print_function -from __future__ import division +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys from optparse import OptionParser diff --git a/scripts/python/suse_git/header.py b/scripts/python/suse_git/header.py index 1cbf0a9..43d4406 100755 --- a/scripts/python/suse_git/header.py +++ b/scripts/python/suse_git/header.py @@ -1,5 +1,5 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*-, +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys import re @@ -331,7 +331,7 @@ class HeaderChecker(patch.PatchChecker): target[tag].append(new_req) def do_patch(self): - for line in self.stream: + for line in self.stream.readlines(): if diffstart.match(line): break diff --git a/scripts/python/suse_git/patch.py b/scripts/python/suse_git/patch.py index 13ff659..2116d15 100644 --- a/scripts/python/suse_git/patch.py +++ b/scripts/python/suse_git/patch.py @@ -1,5 +1,5 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*-, +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys diff --git a/scripts/python/tests/test_header.py b/scripts/python/tests/test_header.py index 59a2906..5051b39 100755 --- a/scripts/python/tests/test_header.py +++ b/scripts/python/tests/test_header.py @@ -1,10 +1,10 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: utf-8 -*-, +# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: import sys import os.path import unittest -from io import StringIO from suse_git import header