[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Whitespace cleanups for timezone.py
- From: Joel Granados <jgranado redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: [PATCH] Whitespace cleanups for timezone.py
- Date: Mon, 3 Nov 2008 07:15:20 -0500 (EST)
I'm seeing the indentation fix and the white space change.
Remember that we also agreed to do this(the tab clean up) while we patched other files. So I don't see any problem.
----- "Hans de Goede" <hdegoede redhat com> wrote:
> David Cantrell wrote:
> > Consistent indentation.
>
> Erm we agreed during the last team meeting that we wouldn't do
> whitespace
> changes purely for the whitespace changes, iow only cleanup whitespace
> as we
> touch the code for different reasons (this was not unanimous but
> wanted by a
> clear majority).
>
> Regards,
>
> Hans
>
>
> > ---
> > timezone.py | 63
> +++++++++++++++++++++++++++++------------------------------
> > 1 files changed, 31 insertions(+), 32 deletions(-)
> >
> > diff --git a/timezone.py b/timezone.py
> > index 16df250..01ade8b 100644
> > --- a/timezone.py
> > +++ b/timezone.py
> > @@ -26,19 +26,18 @@ import logging
> > log = logging.getLogger("anaconda")
> >
> > class Timezone:
> > -
> > def writeKS(self, f):
> > - f.write("timezone")
> > - if self.utc:
> > - f.write(" --utc")
> > - f.write(" %s\n" % self.tz)
> > + f.write("timezone")
> > + if self.utc:
> > + f.write(" --utc")
> > + f.write(" %s\n" % self.tz)
> >
> > def write(self, instPath):
> > - # dont do this in test mode!
> > - if flags.test:
> > - return
> > -
> > - fromFile = instPath + "/usr/share/zoneinfo/" + self.tz
> > + # dont do this in test mode!
> > + if flags.test:
> > + return
> > +
> > + fromFile = instPath + "/usr/share/zoneinfo/" + self.tz
> >
> > if not os.access(fromFile, os.R_OK):
> > log.error("Timezone to be copied (%s) doesn't exist" %
> fromFile)
> > @@ -48,34 +47,34 @@ class Timezone:
> > except OSError, (errno, msg):
> > log.error("Error copying timezone (from %s): %s" %
> (fromFile, msg))
> >
> > - f = open(instPath + "/etc/sysconfig/clock", "w")
> > + f = open(instPath + "/etc/sysconfig/clock", "w")
> >
> > - f.write('ZONE="%s"\n' % self.tz)
> > - f.close()
> > + f.write('ZONE="%s"\n' % self.tz)
> > + f.close()
> >
> > - try:
> > - f = open(instPath + "/etc/adjtime", "r")
> > - lines = f.readlines()
> > - f.close()
> > - except:
> > - lines = [ "0.0 0 0.0\n", "0\n" ]
> > + try:
> > + f = open(instPath + "/etc/adjtime", "r")
> > + lines = f.readlines()
> > + f.close()
> > + except:
> > + lines = [ "0.0 0 0.0\n", "0\n" ]
> >
> > - f = open(instPath + "/etc/adjtime", "w")
> > - f.write(lines[0])
> > - f.write(lines[1])
> > - if self.utc:
> > - f.write("UTC\n")
> > - else:
> > - f.write("LOCAL\n")
> > - f.close()
> > + f = open(instPath + "/etc/adjtime", "w")
> > + f.write(lines[0])
> > + f.write(lines[1])
> > + if self.utc:
> > + f.write("UTC\n")
> > + else:
> > + f.write("LOCAL\n")
> > + f.close()
> >
> > def getTimezoneInfo(self):
> > - return (self.tz, self.utc)
> > + return (self.tz, self.utc)
> >
> > def setTimezoneInfo(self, timezone, asUtc = 0):
> > - self.tz = timezone
> > - self.utc = asUtc
> > + self.tz = timezone
> > + self.utc = asUtc
> >
> > def __init__(self):
> > - self.tz = "America/New_York"
> > - self.utc = 0
> > + self.tz = "America/New_York"
> > + self.utc = 0
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
--
Joel Andres Granados
Red Hat / Brno Czech Republic
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]