Prevent and exception when PORT_LOGDIR is an empty string.
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Jun 2006 01:49:39 +0000 (01:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Jun 2006 01:49:39 +0000 (01:49 -0000)
svn path=/main/trunk/; revision=3589

pym/portage.py

index be9f8c2a88ebe6b24edc478415b56c54f8c3a7bf..63d5f5a9b0aebf612bc62f3e093404cd042ed3a1 100644 (file)
@@ -2720,9 +2720,12 @@ def prepare_build_dirs(myroot, mysettings, cleanup):
                pass # ebuild.sh will create it
 
        if "PORT_LOGDIR" in mysettings:
-               logging_enabled = True
+               if mysettings["PORT_LOGDIR"] == "":
+                       logging_enabled = False
+               else:
+                       logging_enabled = True
 
-               if not makedirs(mysettings["PORT_LOGDIR"]):
+               if logging_enabled and not makedirs(mysettings["PORT_LOGDIR"]):
                        writemsg("!!! Unable to create PORT_LOGDIR\n",
                                noiselevel=-1)
                        logging_enabled = False