Apparently, python doesn't like it when you put a set of comments in front of an...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 03:15:19 +0000 (03:15 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 03:15:19 +0000 (03:15 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1301 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py

index 320d9e624d4158a62481f3d53c03f55d4dc4e574..182dafeeea30f5a370247c43d7a24af1cf4061d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  modules/generic_stage_target.py:
+  Apparently, python doesn't like it when you put a set of comments in front
+  of an elif. Thanks to Robin Johnson <robbat2@gentoo.org> for pointing it out
+  and the patch.
+
   13 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
   modules/generic_stage_target.py:
   Huge refactoring of modules/generic_stage_target.py to fix indentation and
index 7aaaf72d50f3956fbd62a33bf6728eee467c1bc4..50d84bdabec3a0fed6ac1aaa2aa037209b9b7908 100644 (file)
@@ -698,28 +698,28 @@ class generic_stage_target(generic_target):
                                " to "+self.settings["chroot_path"]+" failed."
 
                if self.settings.has_key("AUTORESUME"):
-                       """ Autoresume is valid, SEEDCACHE is valid """
                        if os.path.isdir(self.settings["source_path"]) \
                                and os.path.exists(self.settings["autoresume_path"]+"unpack"):
+                               """ Autoresume is valid, SEEDCACHE is valid """
                                unpack=False
                                invalid_snapshot=False
 
-                       """ Autoresume is valid, tarball is valid """
                        elif os.path.isfile(self.settings["source_path"]) \
                                and self.settings["source_path_hash"]==clst_unpack_hash:
+                               """ Autoresume is valid, tarball is valid """
                                unpack=False
                                invalid_snapshot=True
                        
-                       """ Autoresume is invalid, SEEDCACHE """
                        elif os.path.isdir(self.settings["source_path"]) \
                                and not os.path.exists(self.settings["autoresume_path"]+\
                                "unpack"):
+                               """ Autoresume is invalid, SEEDCACHE """
                                unpack=True
                                invalid_snapshot=False
 
-                       """ Autoresume is invalid, tarball """
                        elif os.path.isfile(self.settings["source_path"]) \
                                and self.settings["source_path_hash"]!=clst_unpack_hash:
+                               """ Autoresume is invalid, tarball """
                                unpack=True
                                invalid_snapshot=True
                else:
@@ -729,18 +729,18 @@ class generic_stage_target(generic_target):
                                if os.path.isdir(self.settings["source_path"]):
                                        unpack=True
                                        invalid_snapshot=False
-                               """ Tarball so unpack and remove anything already there """
                                elif os.path.isfile(self.settings["source_path"]):
+                                       """ Tarball so unpack and remove anything already there """
                                        unpack=True
                                        invalid_snapshot=True
-                       """ No autoresume, no SEEDCACHE """
+                               """ No autoresume, no SEEDCACHE """
                        else:
                                """ Tarball so unpack and remove anything already there """
                                if os.path.isfile(self.settings["source_path"]):
                                        unpack=True
                                        invalid_snapshot=True
-                               """ We should never reach this, so something is very wrong """
                                elif os.path.isdir(self.settings["source_path"]):
+                                       """ We should never reach this, so something is very wrong """
                                        raise CatalystError,\
                                                "source path is a dir but seedcache is not enabled"