From c5716db0e3431a9d47a7b727608889dfe73a6560 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 8 Oct 2010 10:24:13 +0400 Subject: [PATCH] Add rule for execute rescratch command only for flash in builder mode. --- pym/cl_builder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pym/cl_builder.py b/pym/cl_builder.py index 3b5305a..e7252be 100644 --- a/pym/cl_builder.py +++ b/pym/cl_builder.py @@ -320,6 +320,11 @@ class cl_builder(color_print): sourceDirectory = self.clVars.Get('cl_builder_path') bindDirectory = pathJoin(buildDirectory, self.clVars.Get('cl_builder_squash_path')) + if not (self.clVars.Get('os_root_type') == 'livecd' \ + and os.access(self.clVars.Get('cl_builder_iso_path'),os.W_OK)): + self.printERROR( + _("The computer must be load from the flash in Builder mode")) + return False self.printRescratchInfo() if not self.checkVariables(rescratch=True): return False