From 9b09012e7b7680389182d57ecdb9d7fbbacd6513 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= <cedric.dsm@tiolive.com>
Date: Fri, 19 Oct 2012 15:14:25 +0200
Subject: [PATCH] Raise if software_type is not mapped.

Don't have unexpected behavior and silent this error. This is bad. Bad. Bad.
---
 slapos/recipe/softwaretype.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/slapos/recipe/softwaretype.py b/slapos/recipe/softwaretype.py
index 159961f21..ab604c54e 100644
--- a/slapos/recipe/softwaretype.py
+++ b/slapos/recipe/softwaretype.py
@@ -90,12 +90,14 @@ class Recipe:
     self.logger.info('Deploying instance with software type %s' % \
         software_type)
 
+    # Raise if request software_type does not exist ...
     if software_type not in self.options:
-      if 'default' in self.options:
+      # ... Except for backward compatibility. Then use "default".
+      if software_type in ['RootSoftwareType']:
         software_type = 'default'
       else:
-        raise zc.buildout.UserError("This software type isn't mapped. And "
-                                    "there's no default software type.")
+        raise zc.buildout.UserError("This software type (%s) isn't mapped." % \
+            software_type)
 
     instance_file_path = self.options[software_type]
 
-- 
2.30.9