Skip to content

CP-312965: Port to Python 3. Removed obsolete example.#55

Open
kc284 wants to merge 2 commits into
masterfrom
private/kc284/python3
Open

CP-312965: Port to Python 3. Removed obsolete example.#55
kc284 wants to merge 2 commits into
masterfrom
private/kc284/python3

Conversation

@kc284

@kc284 kc284 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
@kc284 kc284 force-pushed the private/kc284/python3 branch from 936649f to 5e156ad Compare June 3, 2026 10:05
@kc284 kc284 changed the title CA-425708: Port to Python 3. Removed obsolete example. CP-312965: Port to Python 3. Removed obsolete example. Jun 3, 2026
Comment thread python/shutdown.py Outdated
Comment thread python/provision.py Outdated
@xueqingz

xueqingz commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Also I miss a comment, do we need to update python files under /misc ?

@kc284

kc284 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Ah yes, I didn't think about the files under /misc. I'll look into it - but if you don't mind I'll raise a new PR to keep things separate.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
@kc284 kc284 force-pushed the private/kc284/python3 branch from a0a691d to fbd0ac7 Compare June 8, 2026 15:04
@kc284 kc284 self-assigned this Jun 8, 2026
Comment thread python/shutdown.py
if not tasks:
return 0

if not(wait_for_tasks(session, map(lambda x:x[0], tasks), 60)):

@xueqingz xueqingz Jun 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just find this, here may need change to if not(wait_for_tasks(session, [t[0] for t in tasks], 60)): ? same for line 184. You can have a confirm.

In Python 2, map() returned a list, but in Python 3 map() returns a single-use iterator. The first pass of the while loop consumes it; on every later pass for task in tasks iterates over nothing, finished stays True, and the function returns immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants