[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix error messages in website build (issue4428077)

From: Phil Holmes
Subject: Re: Fix error messages in website build (issue4428077)
Date: Tue, 3 May 2011 16:29:58 +0100

----- Original Message ----- From: "Graham Percival" <address@hidden>
To: "Phil Holmes" <address@hidden>
Cc: <address@hidden>; <address@hidden>; <address@hidden>; <address@hidden>
Sent: Monday, May 02, 2011 6:28 PM
Subject: Re: Fix error messages in website build (issue4428077)

On Mon, May 02, 2011 at 05:29:27PM +0100, Phil Holmes wrote:
>scripts/build/ known_missing_files = ''
>could this be a list instead of a string?

I thought about whether a string was the _best_ solution, but
decided that using a read() and find() was simplest and probably

python has .readlines() for a file, and generally it's
"pythonesque" to use lists.

Just looked at this. readlines() leaves the newline character on the end of each string in the list and so therefore the filename isn't found in the list and therefore the error message is printed out. Now, it would be possible to append the \n to the filename before the test, or to loop the list and strip the \n, or a few other things, but it seems to me that this is adding code that is peripheral to the main aim of the script. My suggestion? Stick with the string version.

Phil Holmes

reply via email to

[Prev in Thread] Current Thread [Next in Thread]