Skip to content

Commit e10e50d

Browse files
committed
Collapse conditional logic for function
1 parent 9613e43 commit e10e50d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

splunklib/data.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ def load(text, match=None):
7979
}
8080

8181
# Convert to unicode encoding in only python 2 for xml parser
82-
if sys.version_info < (3, 0, 0):
83-
if isinstance(text, unicode):
84-
text = text.encode('utf-8')
82+
if(sys.version_info < (3, 0, 0) and isinstance(text, unicode)):
83+
text = text.encode('utf-8')
8584

8685
root = XML(text)
8786
items = [root] if match is None else root.findall(match)

0 commit comments

Comments
 (0)