diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-09-10 21:06:09 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-09-10 21:06:09 +0200 |
commit | 7938e6ea83364f0061d6c6a42d2242c02f5fc04b (patch) | |
tree | 160e6237544685eef0693f11cfe6766ddc0a08bc | |
parent | 948126c955ff3e4d0317c81ae8d17c80e36208ec (diff) | |
parent | a78a65911a710059411259db660fc21e7825571b (diff) | |
download | ayatana-indicator-session-7938e6ea83364f0061d6c6a42d2242c02f5fc04b.tar.gz ayatana-indicator-session-7938e6ea83364f0061d6c6a42d2242c02f5fc04b.tar.bz2 ayatana-indicator-session-7938e6ea83364f0061d6c6a42d2242c02f5fc04b.zip |
Merge branch 'tari01-pr/trim-lcov-py3'
Attributes GH PR #22: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/22
-rwxr-xr-x | trim-lcov.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/trim-lcov.py b/trim-lcov.py index 78613d3..2cd8dee 100755 --- a/trim-lcov.py +++ b/trim-lcov.py @@ -1,4 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- # This script removes branch and/or line coverage data for lines that # contain a particular substring. @@ -38,7 +39,10 @@ for line in sys.stdin: # Source file if keyword == 'SF': - source = file(rest).readlines() + + with open(rest, 'r') as pFile: + + source = pFile.readlines() # Branch coverage data elif keyword == 'BRDA': @@ -50,4 +54,4 @@ for line in sys.stdin: if check_suppress(line_suppress, source, rest): continue - print line + print(line) |