Re: [PATCH] Whitespace cleanups for timezone.py

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

 



On Mon, Nov 03, 2008 at 07:15:20AM -0500, Joel Granados wrote:
> 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.

So is this patch and yes or no for inclusion?  I went ahead and did this to
timezone.py because it was short.

> ----- "Hans de Goede" <hdegoede@xxxxxxxxxx> 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@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 
> -- 
> Joel Andres Granados
> Red Hat / Brno Czech Republic
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

Attachment: pgpB46VcnySlZ.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux