Skip to content

Commit 58a7b73

Browse files
committed
Catching None exeption in funcions
1 parent c8b1c3e commit 58a7b73

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ You can easily customize your own configurations from the set of features that S
8484

8585
## Version
8686
```
87-
4.7.5.12.12
87+
4.7.5.12.13
8888
```
8989

9090
## RML-Test Cases

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.7.5.12.12
1+
4.7.5.12.13

rdfizer/rdfizer/fnml_functions.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def isNull():
6363

6464
def trueCondition():
6565
if bool(global_dic["strBoolean"]):
66-
return str(global_dic["str"])
66+
if "None" != str(global_dic["str"]):
67+
return str(global_dic["str"])
68+
else:
69+
return None
6770
else:
6871
return None
6972

@@ -87,12 +90,18 @@ def string_md5():
8790
def controls_if():
8891
if bool(global_dic["bool_b"]):
8992
if "any_true" in global_dic:
90-
return str(global_dic["any_true"])
93+
if "None" == str(global_dic["any_true"]):
94+
return None
95+
else:
96+
return str(global_dic["any_true"])
9197
else:
9298
return None
9399
else:
94100
if "any_false" in global_dic:
95-
return str(global_dic["any_false"])
101+
if "None" == str(global_dic["any_false"]):
102+
return None
103+
else:
104+
return str(global_dic["any_false"])
96105
else:
97106
return None
98107

0 commit comments

Comments
 (0)