Volans has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/349732 )
Change subject: Make more evident when a submenu was completed
......................................................................
Make more evident when a submenu was completed
Bug: T163371
Change-Id: I47be4e860f47ad676d68dbab50af5d9bc1678cc9
---
M switchdc/menu.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/switchdc
refs/changes/32/349732/1
diff --git a/switchdc/menu.py b/switchdc/menu.py
index a95743a..9d279ea 100644
--- a/switchdc/menu.py
+++ b/switchdc/menu.py
@@ -21,7 +21,12 @@
def status(self):
"""Getter for the menu status, returns a string representation of the
status of it's tasks."""
completed, total = Menu.calculate_status(self)
- return '{completed}/{total}'.format(completed=completed, total=total)
+ if completed == total:
+ message = 'DONE'
+ else:
+ message = '{completed}/{total}'.format(completed=completed,
total=total)
+
+ return message
def append(self, item, idx=None):
"""Append an item or a submenu to this menu.
--
To view, visit https://gerrit.wikimedia.org/r/349732
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I47be4e860f47ad676d68dbab50af5d9bc1678cc9
Gerrit-PatchSet: 1
Gerrit-Project: operations/switchdc
Gerrit-Branch: master
Gerrit-Owner: Volans <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits