[PATCH 3/6] Code cleanups
Jesse Keating
jkeating at redhat.com
Tue Nov 13 05:50:57 UTC 2012
Get rid of unused import, use super(), remove some spaces
---
pyanaconda/desktop.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/desktop.py b/pyanaconda/desktop.py
index b6207a6..c65e925 100644
--- a/pyanaconda/desktop.py
+++ b/pyanaconda/desktop.py
@@ -19,14 +19,14 @@
# Author(s): Matt Wilson <msw at redhat.com>
#
-import string, os
+import os
from simpleconfig import SimpleConfigFile
from pyanaconda.constants import ROOT_PATH, RUNLEVELS
import logging
log = logging.getLogger("anaconda")
-class Desktop (SimpleConfigFile):
+class Desktop(SimpleConfigFile):
#
# This class represents the default desktop to run and the default runlevel
# to start in
@@ -45,14 +45,14 @@ class Desktop (SimpleConfigFile):
def getDefaultDesktop(self):
return self.get("DESKTOP")
- def __init__ (self):
- SimpleConfigFile.__init__ (self)
+ def __init__(self):
+ super(Desktop, self).__init__()
self.runlevel = 3
def write(self):
if self.getDefaultDesktop():
f = open(ROOT_PATH + "/etc/sysconfig/desktop", "w")
- f.write(str (self))
+ f.write(str(self))
f.close()
if not os.path.isdir(ROOT_PATH + '/etc/systemd/system'):
--
1.7.11.4
More information about the anaconda-patches
mailing list