summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-10-31 15:18:54 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-11-03 09:48:22 -1000
commitae7bea0e913d505d8b3277b52e6b7a2e1e5a2be0 (patch)
tree7674076c2d8d6cedcfd77395178f9596f8cb17d5
parent6320911c4404d217b461aa2f108a67e3f97312c1 (diff)
downloadanaconda-ae7bea0e913d505d8b3277b52e6b7a2e1e5a2be0.tar.gz
anaconda-ae7bea0e913d505d8b3277b52e6b7a2e1e5a2be0.tar.xz
anaconda-ae7bea0e913d505d8b3277b52e6b7a2e1e5a2be0.zip
Whitespace cleanups for timezone.py
Consistent indentation.
-rw-r--r--timezone.py63
1 files changed, 31 insertions, 32 deletions
diff --git a/timezone.py b/timezone.py
index 16df25084..01ade8be0 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