Assign 'cfgprot' before referencing it. Reported by Thomas Sachau.
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
Sat, 11 Jul 2009 17:05:54 +0000 (17:05 -0000)
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
Sat, 11 Jul 2009 17:05:54 +0000 (17:05 -0000)
svn path=/main/trunk/; revision=13814

pym/portage/dbapi/vartree.py

index a5b39e317f6436ff99cc317c424246e7423eb0b2..486439718445eb6896f73c0a3c1e51014729e32f 100644 (file)
@@ -3834,13 +3834,13 @@ class dblink(object):
                                protected = self.isprotected(mydest)
                                if mydmode != None:
                                        # destination file exists
+                                       cfgprot = 0
                                        if stat.S_ISDIR(mydmode):
                                                # install of destination is blocked by an existing directory with the same name
                                                cfgprot = 1
                                                showMessage("!!! %s\n" % mydest,
                                                        level=logging.ERROR, noiselevel=-1)
                                        elif stat.S_ISREG(mydmode) or (stat.S_ISLNK(mydmode) and os.path.exists(mydest) and stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
-                                               cfgprot = 0
                                                # install of destination is blocked by an existing regular file,
                                                # or by a symlink to an existing regular file;
                                                # now, config file management may come into play.