From 7bfd411e853a239ad11e8fda3c7f81fbf3ca6dc5 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 14 Feb 2008 03:15:19 +0000 Subject: [PATCH] Apparently, python doesn't like it when you put a set of comments in front of an elif. Thanks to Robin Johnson for pointing it out and the patch. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1301 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 6 ++++++ modules/generic_stage_target.py | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 320d9e62..182dafee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 14 Feb 2008; Chris Gianelloni + 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 for pointing it out + and the patch. + 13 Feb 2008; Chris Gianelloni modules/generic_stage_target.py: Huge refactoring of modules/generic_stage_target.py to fix indentation and diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 7aaaf72d..50d84bda 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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" -- 2.26.2