On Tue, Sep 23, 2014 at 12:00:13PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
When rising OpPrereqError, the arguments always have to be
a human-readable string and an error code. Provide that.
Signed-off-by: Klaus Aehlig <[email protected]>
---
lib/cmdlib/instance_utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cmdlib/instance_utils.py b/lib/cmdlib/instance_utils.py
index bfde53c..175b53e 100644
--- a/lib/cmdlib/instance_utils.py
+++ b/lib/cmdlib/instance_utils.py
@@ -649,7 +649,7 @@ def CheckCompressionTool(lu, compression_tool):
compression_tool not in allowed_tools):
raise errors.OpPrereqError(
"Compression tool not allowed, tools allowed are [%s]"
- % ", ".join(allowed_tools)
+ % ", ".join(allowed_tools), errors.ECODE_INVAL
)
--
2.1.0.rc2.206.gedb03e5
LGTM