Skip to content

Commit 8069077

Browse files
authored
Modified the example code
The example code was not running. Modified the code to fix the error faced previously More reference here: microsoft#494
1 parent 2cd2d0f commit 8069077

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,11 @@ core_client = connection.clients.get_core_client()
3434

3535
# Get the first page of projects
3636
get_projects_response = core_client.get_projects()
37+
3738
index = 0
38-
while get_projects_response is not None:
39-
for project in get_projects_response.value:
40-
pprint.pprint("[" + str(index) + "] " + project.name)
41-
index += 1
42-
if get_projects_response.continuation_token is not None and get_projects_response.continuation_token != "":
43-
# Get the next page of projects
44-
get_projects_response = core_client.get_projects(continuation_token=get_projects_response.continuation_token)
45-
else:
46-
# All projects have been retrieved
47-
get_projects_response = None
39+
for project in get_projects_response:
40+
pprint.pprint("[" + str(index) + "] " + project.name)
41+
index += 1
4842
```
4943

5044
## API documentation

0 commit comments

Comments
 (0)