forked from pool/rpmlint
Ludwig Nussel
dadba5cd0e
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=318
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From 47b0d8ce1a36006e99ccc5e6c8f75be322b6fbac Mon Sep 17 00:00:00 2001
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Fri, 10 Apr 2015 16:22:26 +0200
|
|
Subject: [PATCH] save content to an array
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
due to the following join the generator would be at the end so iterating
|
|
through lines wouldn't work
|
|
|
|
Modified-by: Ville Skyttä <ville.skytta@iki.fi> (pep8 fixes)
|
|
---
|
|
InitScriptCheck.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
|
|
index 1a58562..aab1d2d 100644
|
|
--- a/InitScriptCheck.py
|
|
+++ b/InitScriptCheck.py
|
|
@@ -103,7 +103,7 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
|
# check common error in file content
|
|
content = None
|
|
try:
|
|
- content = Pkg.readlines(pkgfile.path)
|
|
+ content = [x for x in Pkg.readlines(pkgfile.path)]
|
|
except Exception:
|
|
e = sys.exc_info()[1]
|
|
printWarning(pkg, 'read-error', e)
|