From a8b4fdda33a866bdd2139a424dedd398cd283e62 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 23 Aug 2016 17:14:15 +0200 Subject: [PATCH] Update copy_utils.py --- src/fenrir-package/utils/copy_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fenrir-package/utils/copy_utils.py b/src/fenrir-package/utils/copy_utils.py index b7e930c9..86b8d898 100644 --- a/src/fenrir-package/utils/copy_utils.py +++ b/src/fenrir-package/utils/copy_utils.py @@ -1,6 +1,10 @@ #!/bin/python -def getTextBetweenMarks(inText, firstMark = {'x':0,'y':0}, secondMark = {'x':0,'y':2}): +def getTextBetweenMarks(inText, firstMark, secondMark): + if firstMark == None: + return '' + if secondMark == None: + return '' if (firstMark['y'] + 1) * (firstMark['x'] + 1) <= (secondMark['y'] + 1) * (secondMark['x'] + 1): startMark = firstMark.copy() endMark = secondMark.copy()