commit:     5c79385fc2a02d4e539ef5fe646397da98f72bde
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  1 07:31:59 2013 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Feb 26 19:15:20 2015 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=5c79385f

Rename local unpack var to _unpack

The method name was unpack, so rename the local var to _unpack to help avoid 
confusion.

---
 catalyst/base/stagebase.py        | 18 +++++++++---------
 catalyst/targets/livecd_stage2.py |  6 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f8443d8..bdeaedd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -662,7 +662,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                                        raise CatalystError("Unable to 
auto-unbind " + target)
 
        def unpack(self):
-               unpack=True
+               _unpack=True
 
                clst_unpack_hash = self.resume.get("unpack")
 
@@ -712,49 +712,49 @@ class StageBase(TargetBase, ClearBase, GenBase):
                        if os.path.isdir(self.settings["source_path"]) \
                                and self.resume.is_enabled("unpack"):
                                """ Autoresume is valid, SEEDCACHE is valid """
-                               unpack=False
+                               _unpack=False
                                invalid_snapshot=False
 
                        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
+                               _unpack=False
                                invalid_snapshot=True
 
                        elif os.path.isdir(self.settings["source_path"]) \
                                and self.resume.is_disabled("unpack"):
                                """ Autoresume is invalid, SEEDCACHE """
-                               unpack=True
+                               _unpack=True
                                invalid_snapshot=False
 
                        elif os.path.isfile(self.settings["source_path"]) \
                                and 
self.settings["source_path_hash"]!=clst_unpack_hash:
                                """ Autoresume is invalid, tarball """
-                               unpack=True
+                               _unpack=True
                                invalid_snapshot=True
                else:
                        """ No autoresume, SEEDCACHE """
                        if "seedcache" in self.settings["options"]:
                                """ SEEDCACHE so let's run rsync and let it 
clean up """
                                if os.path.isdir(self.settings["source_path"]):
-                                       unpack=True
+                                       _unpack=True
                                        invalid_snapshot=False
                                elif 
os.path.isfile(self.settings["source_path"]):
                                        """ Tarball so unpack and remove 
anything already there """
-                                       unpack=True
+                                       _unpack=True
                                        invalid_snapshot=True
                                """ No autoresume, no SEEDCACHE """
                        else:
                                """ Tarball so unpack and remove anything 
already there """
                                if os.path.isfile(self.settings["source_path"]):
-                                       unpack=True
+                                       _unpack=True
                                        invalid_snapshot=True
                                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")
 
-               if unpack:
+               if _unpack:
                        self.mount_safety_check()
 
                        if invalid_snapshot:

diff --git a/catalyst/targets/livecd_stage2.py 
b/catalyst/targets/livecd_stage2.py
index 38b6884..45a6767 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -86,7 +86,7 @@ class livecd_stage2(StageBase):
                        myf.close()
 
        def unpack(self):
-               unpack=True
+               _unpack=True
                display_msg=None
 
                clst_unpack_hash = self.resume.get("unpack")
@@ -102,12 +102,12 @@ class livecd_stage2(StageBase):
                        if os.path.isdir(self.settings["source_path"]) and \
                                self.resume.is_enabled("unpack"):
                                print "Resume point detected, skipping unpack 
operation..."
-                               unpack=False
+                               _unpack=False
                        elif "source_path_hash" in self.settings:
                                if self.settings["source_path_hash"] != 
clst_unpack_hash:
                                        invalid_snapshot=True
 
-               if unpack:
+               if _unpack:
                        self.mount_safety_check()
                        if invalid_snapshot:
                                print "No Valid Resume point detected, cleaning 
up  ..."

Reply via email to