aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-10 21:09:12 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-10 21:09:12 +0200
commit2e680e5949d62cd1221f05dc6df485907521b989 (patch)
tree5f39e54dbf2cdaa4e26c7a156a01140063185c11
parent62d8eebd99d5d8edb56358627dd5c045ba16159a (diff)
parenta77a2bfdc8fec561357bf083eaa3847a7e6a3684 (diff)
downloadayatana-indicator-datetime-2e680e5949d62cd1221f05dc6df485907521b989.tar.gz
ayatana-indicator-datetime-2e680e5949d62cd1221f05dc6df485907521b989.tar.bz2
ayatana-indicator-datetime-2e680e5949d62cd1221f05dc6df485907521b989.zip
Merge branch 'tari01-pr/trim-lcov-py3'
Attributes GH PR #19: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/19
-rwxr-xr-xtrim-lcov.py10
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)