Rename local unpack var to _unpack
authorBrian Dolbec <dolsen@gentoo.org>
Sat, 1 Jun 2013 07:31:59 +0000 (00:31 -0700)
committerBrian Dolbec <dolsen@gentoo.org>
Tue, 4 Jun 2013 15:52:42 +0000 (08:52 -0700)
The method name was unpack, so rename the local var to _unpack to help avoid confusion.

catalyst/base/stagebase.py
catalyst/targets/livecd_stage2.py

index 564234d2dbec750fd56266d899223ac770e76504..1db0f818d1b1e1caf57d3236bd160b4b3b50ec8d 100644 (file)
@@ -657,7 +657,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                                                target, print_traceback=True)
 
        def unpack(self):
-               unpack=True
+               _unpack=True
 
                clst_unpack_hash = self.resume.get("unpack")
 
@@ -707,49 +707,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:
index 46a40dd38b7b7501a61be9ed3cadaf1116e7d098..c22fa0fce22730d2b1ff7af72daee16948321915 100644 (file)
@@ -84,7 +84,7 @@ class livecd_stage2(StageBase):
                        myf.close()
 
        def unpack(self):
-               unpack=True
+               _unpack=True
                display_msg=None
 
                clst_unpack_hash = self.resume.get("unpack")
@@ -100,12 +100,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  ..."