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

Re: [PATCH 4/4] Disable ipv6 kernel modules if user disables IPv6 (#537887)



On Mon, 9 Aug 2010, Brian C. Lane wrote:

On 08/09/2010 10:57 AM, Brian C. Lane wrote:
On 08/06/2010 10:45 PM, dcantrell redhat com wrote:
From: David Cantrell <dcantrell redhat com>

+            f = open(c, "w+")
+            if header:
+                f.write(header)

header and check for isfile isn't needed, since this is the first time
it has been written, and you're using "w+" which will overwrite it anyway.


and I just realized there is no "w+" mode, r+ is read/write. It seems to
work, but should probably be changed to plain old "w"

"w"?  Based on what I'm seeing here:

    http://docs.python.org/library/functions.html

it should be "a".  But then there are "r+", "w+", and "a+" which open for
updating.  Looks like they got the USPS to guest-author this part of the
Python documentation.

--
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI


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