From 011b87eadcf3dd9694080a23ebe1eebd65676e79 Mon Sep 17 00:00:00 2001 From: SrikanteswaraRao Talluri Date: Fri, 8 Nov 2013 18:00:55 +0530 Subject: [PATCH] fixed indentaion problem in utils.py :359 Conflicts: tools/marvin/marvin/integration/lib/utils.py --- tools/marvin/marvin/integration/lib/utils.py | 31 ++++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index a106fc0e2f8..df3ca8aac9c 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -329,11 +329,10 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): (config.mgtSvr[0].mgtSvrIp, e)) return 'snapshot exists' in result - def validateList(inp): - ''' - @name: validateList - @Description: 1. A utility function to validate + """ + @name: validateList + @Description: 1. A utility function to validate whether the input passed is a list 2. The list is empty or not 3. If it is list and not empty, return PASS and first element @@ -350,18 +349,18 @@ def validateList(inp): default to None. INVALID_INPUT EMPTY_LIST - ''' - ret = [FAIL, None, None] - if inp is None: - ret[2] = INVALID_INPUT - return ret - if not isinstance(inp, list): - ret[2] = INVALID_INPUT - return ret - if len(inp) == 0: - ret[2] = EMPTY_LIST - return ret - return [PASS, inp[0], None] + """ + ret = [FAIL, None, None] + if inp is None: + ret[2] = INVALID_INPUT + return ret + if not isinstance(inp, list): + ret[2] = INVALID_INPUT + return ret + if len(inp) == 0: + ret[2] = EMPTY_LIST + return ret + return [PASS, inp[0], None] def verifyElementInList(inp, toverify, responsevar=None, pos=0): '''