)]}'
{"cinderclient/v2/shell.py":[{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"ce34f9333e23a524c86652eed5da4b0314cffa9c","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_50d71423","line":1452,"updated":"2015-10-19 21:08:52.000000000","message":"if single, you will not print any error message here, nor will an exception be raised in line #1459.\nI think the code is fine without any of the lines referring to \u0027single\u0027 (i.e. you could remove L#1443, L#1452, L#1455)","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"54eb0f58ca6f2c90818d2d9a407686ec816e9280","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_805c57ee","line":1452,"in_reply_to":"3a29b11f_005fe70e","updated":"2015-10-20 14:37:15.000000000","message":"Yes, getting rid of \"if not single\" on L#1455 would cause the exception to be raised.\nBut don\u0027t you want the message in L#1451 to be printed in the logs? It would be nice to know the backup id in the output for a single failure, as well as if there were multiple backups.","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"54eb0f58ca6f2c90818d2d9a407686ec816e9280","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_fd8ff4c9","line":1452,"in_reply_to":"3a29b11f_0a7e28ae","updated":"2015-10-20 14:37:15.000000000","message":"I\u0027d file a separate bug for that. But, yes, if the do_snapshot_reset_state has this same logic, it is a bug and should be fixed. Others might debate whether that fix should be combined with this feature, with a link to the bug in the commit message, or put up as a separate patch.","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"f75935d29b9673e4d4bf9c6f2628e86367859b82","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_40371fe3","line":1452,"in_reply_to":"3a29b11f_50d71423","updated":"2015-10-20 14:33:26.000000000","message":"Actually, looking at it again I think the exception will be raised on line 1459 if the single backup reset failed, because failure_count will be 1, which would be equal to len(args.backup). I think this is correct.","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"cbb274c4d02cef00efec7bccf13b7a5a6de6ecda","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_0a7e28ae","line":1452,"in_reply_to":"3a29b11f_50d71423","updated":"2015-10-20 14:14:30.000000000","message":"Ah yes you\u0027re right, I missed that. I modeled this function after do_snapshot_reset_state in this same file since it has similar functionality, should I make the same fixes in that function?","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"6f663d420e3acd4ff9e730cd61e7f49acb7ae148","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_005fe70e","line":1452,"in_reply_to":"3a29b11f_50d71423","updated":"2015-10-20 14:34:17.000000000","message":"I just need to get rid of \"if not single\" there","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"afeda6977f13f7481dfa058f3e38c1589d534b5d","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"        except Exception as e:"},{"line_number":1450,"context_line":"            failure_count +\u003d 1"},{"line_number":1451,"context_line":"            msg \u003d \"Reset state for backup %s failed: %s\" % (backup, e)"},{"line_number":1452,"context_line":"            if not single:"},{"line_number":1453,"context_line":"                print(msg)"},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    if failure_count \u003d\u003d len(args.backup):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_db93204e","line":1452,"in_reply_to":"3a29b11f_805c57ee","updated":"2015-10-20 14:54:36.000000000","message":"Ah okay, I\u0027m understanding better now - so if the exception on line 1459 is taken out of that \u0027if not single\u0027 conditional, then if it was single \u0027msg\u0027 would still be set from line 1450 and it would be raised correctly. That is how it was done in do_snapshot_reset_state, I just had an incorrect indentation on line 1459.","commit_id":"976b110b686070b3a53db8d6d5024847bf6ca35e"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"3bfeed6c4e90affeddacc946cf70e3a964a123ef","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"        if not single:"},{"line_number":1457,"context_line":"            msg \u003d (\"Unable to reset the state for any of the specified \""},{"line_number":1458,"context_line":"                   \"backups.\")"},{"line_number":1459,"context_line":"        raise exceptions.CommandError(msg)"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"@utils.arg(\u0027volume\u0027, metavar\u003d\u0027\u003cvolume\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_12741666","line":1459,"updated":"2015-10-20 15:54:52.000000000","message":"OK, this works now. Thanks!","commit_id":"b96749689a9dbf446aab4e053863497bd069a716"}]}
