Patchwork [bitbake-devel,9/9] toasterui: fix django settings environment value

mail settings
Submitter Alexandru DAMIAN
Date June 3, 2014, 3:26 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/73157/
State New
Headers show


Alexandru DAMIAN - June 3, 2014, 3:26 p.m.
From: Alexandru DAMIAN <>

Previously, the buildinfohelper only set a django settings module
environment variable if none were set.

This may lead to problems when the starting the toasterui
from an already existing Django environment.

As such, we always override the variable to provide the
correct name for the local Django settings module.

Signed-off-by: Alexandru DAMIAN <>
 lib/bb/ui/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/lib/bb/ui/ b/lib/bb/ui/
index 6965570..58df687 100644
--- a/lib/bb/ui/
+++ b/lib/bb/ui/
@@ -22,7 +22,7 @@  import bb
 import re
 import ast
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toaster.toastermain.settings")
+os.environ["DJANGO_SETTINGS_MODULE"] = "toaster.toastermain.settings"
 import toaster.toastermain.settings as toaster_django_settings
 from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage, HelpText