Juan Hernandez has posted comments on this change. Change subject: packaging: Added a functionality for interaction with user ......................................................................
Patch Set 1: Looks good to me, but someone else must approve (2 inline comments) I am really curious about what is the reason to use StringIO. .................................................... File packaging/fedora/setup/common_utils.py Line 903: else: Line 904: return askYesNo(question) Line 905: Line 906: def askYesNoContinue(question=None): Line 907: message = StringIO() I have difficulties accepting that we need StringIO to create a simple string. Why not just this? askString = ... rawAnswer = raw_input(askString) Is there any obscure reason to use StringIO? Line 908: askString = "%s? (yes|no|continue): "%(question) Line 909: logging.debug("asking user: %s"%askString) Line 910: message.write(askString) Line 911: message.seek(0) Line 918: return 'n' Line 919: elif answer == "continue" or answer == "c": Line 920: return 'c' Line 921: else: Line 922: return askYesNoContinue(question) First time I see recursion used for this use case. Line 923: Line 924: def retry(func, expectedException=Exception, tries=None, timeout=None, sleep=1): Line 925: """ Line 926: Retry a function. Wraps the retry logic so you don't have to -- To view, visit http://gerrit.ovirt.org/8703 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibdd343015a35d8558548ba1a66874776e3828b0e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Kiril Nesenko <knese...@redhat.com> Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches