Allow factory server to run
* Don't import builder unless a build is requested.
BUG=chrome-os-partner:4941
TEST=run outside chroot
Change-Id: Id42f2456e21403af8edf0f765c4a3865e543fd26
Reviewed-on: http://gerrit.chromium.org/gerrit/5337
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
diff --git a/devserver.py b/devserver.py
index 505ea5a..a17f55c 100755
--- a/devserver.py
+++ b/devserver.py
@@ -13,7 +13,6 @@
import sys
import autoupdate
-import builder
CACHED_ENTRIES = 12
@@ -88,10 +87,13 @@
"""
def __init__(self):
- self._builder = builder.Builder()
+ self._builder = None
def build(self, board, pkg, **kwargs):
"""Builds the package specified."""
+ import builder
+ if self._builder is None:
+ self._builder = builder.Builder()
return self._builder.Build(board, pkg, kwargs)
def index(self):