[PATCH 2/6] Link to the correct default target

Chris Lumens clumens at redhat.com
Tue Nov 13 14:51:41 UTC 2012


> @@ -32,7 +32,7 @@ class Desktop (SimpleConfigFile):
>  # to start in
>  #
>      def setDefaultRunLevel(self, runlevel):
> -        if str(runlevel) != "3" and str(runlevel) != "5":
> +        if int(runlevel) not in RUNLEVELS.keys():
>              raise RuntimeError, "Desktop::setDefaultRunLevel() - Must specify runlevel as 3 or 5!"
>          self.runlevel = runlevel
>  

Just a quick python style note.  You can leave off the keys bit there
and just check like this:

    if int(runlevel) not in RUNLEVELS:

Not that it matters much, and I'm sure I've done the same plenty of
places.

- Chris


More information about the anaconda-patches mailing list