aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-10 21:03:01 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-10 21:03:01 +0200
commitcce52a7ee077a7c8151ac27509349c5ec85a24c7 (patch)
tree9750680d689e065c4382bb803024b78e4982bb9f
parent6b0ca37594f5c3c949a3b4bd287afc283011485c (diff)
parentc310b42b7e3f51cf55598ecac1811d1d4967fec9 (diff)
downloadlibayatana-indicator-cce52a7ee077a7c8151ac27509349c5ec85a24c7.tar.gz
libayatana-indicator-cce52a7ee077a7c8151ac27509349c5ec85a24c7.tar.bz2
libayatana-indicator-cce52a7ee077a7c8151ac27509349c5ec85a24c7.zip
Merge branch 'tari01-pr/trim-lcov-py3'
Attributes GH PR #28: https://github.com/AyatanaIndicators/libayatana-indicator/pull/28
-rwxr-xr-xtrim-lcov.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/trim-lcov.py b/trim-lcov.py
index 8465e95..767ab37 100755
--- a/trim-lcov.py
+++ b/trim-lcov.py
@@ -1,4 +1,5 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
# Copyright 2013 Canonical Ltd.
#
@@ -54,7 +55,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':
@@ -66,4 +70,4 @@ for line in sys.stdin:
if check_suppress(line_suppress, source, rest):
continue
- print line
+ print(line)