Skip to content

Commit a3514e8

Browse files
committed
Fixed
1 parent acde115 commit a3514e8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ldapconsole.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,10 @@ def parseArgs():
740740

741741
if _select_index != -1:
742742
_query = " ".join(arguments[0:_select_index]).strip()
743-
_attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ")
743+
if len(arguments[_select_index + 1:]) == 0:
744+
_attrs = []
745+
else:
746+
_attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ")
744747
else:
745748
_query = " ".join(arguments[0:]).strip()
746749
_attrs = ["*"]
@@ -767,7 +770,10 @@ def parseArgs():
767770
_select_index = -1
768771

769772
if _select_index != -1:
770-
_attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ")
773+
if len(arguments[_select_index + 1:]) == 0:
774+
_attrs = []
775+
else:
776+
_attrs = " ".join(arguments[_select_index + 1:]).replace(","," ").split(" ")
771777
else:
772778
_attrs = ["*"]
773779

0 commit comments

Comments
 (0)