)]}'
{"cinder/volume/drivers/windows.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"03cd4116f9a75f15c4ce346f9bf786d5be6dbb63","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                           \u0027 while ensuring export\u0027), exc)"},{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F9ns%3D","line":209,"updated":"2012-12-18 19:18:07.000000000","message":"nitpick: len() is redundant here.\n\nif not q:\n\nwill suffice.","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"83058f9e57c8872eb6f809e3f2fcaa625d213080","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"},{"line_number":213,"context_line":"        wt_disk \u003d q[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMX%2F%2F0SU%3D","line":210,"updated":"2012-12-14 07:09:20.000000000","message":"Why not just pass vol_name instead of getting a dict with all local symbols here?","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"},{"author":{"_account_id":3185,"name":"Alessandro Pilotti","email":"apilotti@cloudbasesolutions.com","username":"alexpilotti"},"change_message_id":"f61a4739b3f5fb3a954ebd0433d93550be8235a2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"},{"line_number":213,"context_line":"        wt_disk \u003d q[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F97A%3D","line":210,"in_reply_to":"AAAAM3%2F%2F%2FAI%3D","updated":"2012-12-18 16:22:21.000000000","message":"One of the main reasons I prefer this approach is to have named    placeholders in the format string, as the log(n) access times in the locals() are definitely negligible, I don\u0027t see anything scary here, but hey again, np, going to resubmit!","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d8fc798af5e6d1a98fdff057a39b178b05025413","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"},{"line_number":213,"context_line":"        wt_disk \u003d q[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2FAI%3D","line":210,"in_reply_to":"AAAAM3%2F%2F%2FF4%3D","updated":"2012-12-18 00:32:45.000000000","message":"Yes please. Since you\u0027re already defining vol_name three lines above, I would just use that. locals() IMHO makes sense for quick one off scripts, otherwise can be a little scary in bigger applications where the tradeoffs just aren\u0027t worth the convenience.","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"03cd4116f9a75f15c4ce346f9bf786d5be6dbb63","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"},{"line_number":213,"context_line":"        wt_disk \u003d q[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F9n0%3D","line":210,"in_reply_to":"AAAAM3%2F%2F97A%3D","updated":"2012-12-18 19:18:07.000000000","message":"Best of both worlds without passing a dict with everything in scope:\n\nLOG.debug(_(\u0027Disk not found: %(name)s\u0027) % volume)","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"},{"author":{"_account_id":3185,"name":"Alessandro Pilotti","email":"apilotti@cloudbasesolutions.com","username":"alexpilotti"},"change_message_id":"d207b911b2ba394c98350fc8114d91d9b8e78977","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        #Get the disk to add"},{"line_number":208,"context_line":"        vol_name \u003d volume[\u0027name\u0027]"},{"line_number":209,"context_line":"        q \u003d self._conn_wmi.WT_Disk(Description\u003dvol_name)"},{"line_number":210,"context_line":"        if not len(q):"},{"line_number":211,"context_line":"            LOG.debug(_(\u0027Disk not found: %(vol_name)s\u0027) % locals())"},{"line_number":212,"context_line":"            return None"},{"line_number":213,"context_line":"        wt_disk \u003d q[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2FF4%3D","line":210,"in_reply_to":"AAAAMX%2F%2F0SU%3D","updated":"2012-12-17 20:13:16.000000000","message":"for conformity with what we do in other OpenStack projects, but if you prefer so I can change it of course, np.","commit_id":"3cb383577cb7be35db6ec9ded11b5c5c8b72f2ab"}]}
