)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"4e0390bd109eba982e7fcaaa408958b9d370786d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch adds a check to the pxe driver for TFTP service. The"},{"line_number":10,"context_line":"PXE driver will now attempt to download a file from the configured"},{"line_number":11,"context_line":"TFTP server, In it\u0027s current form the check only logs a warning."},{"line_number":12,"context_line":"This is ment to be a pre-flight style check to inform operators of"},{"line_number":13,"context_line":"simple configuration errors upon startup and is not ment to replace"},{"line_number":14,"context_line":"run time error handling."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3ab451fb_f02fa8f4","line":12,"updated":"2015-04-16 22:27:34.000000000","message":"s/ment/meant/","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"4e0390bd109eba982e7fcaaa408958b9d370786d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"PXE driver will now attempt to download a file from the configured"},{"line_number":11,"context_line":"TFTP server, In it\u0027s current form the check only logs a warning."},{"line_number":12,"context_line":"This is ment to be a pre-flight style check to inform operators of"},{"line_number":13,"context_line":"simple configuration errors upon startup and is not ment to replace"},{"line_number":14,"context_line":"run time error handling."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I69411a089e2ce2f9f010ebc98bb2eff53cfbd568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3ab451fb_903f4425","line":13,"updated":"2015-04-16 22:27:34.000000000","message":"s/ment/meant/","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"}],"ironic/common/tftp_util.py":[{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"4a42764df258d47c09b5f16253eb4f13392e3d8e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# This file is based on orginal work as licensed below."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# Copyright (C) 2001,2007  Ray Burr"},{"line_number":18,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_562157fa","line":15,"updated":"2015-04-03 17:33:11.000000000","message":"s/orginal/original/","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"128ae71ad74143d64af24b5e5b6242daa90018a5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# This file is based on orginal work as licensed below."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# Copyright (C) 2001,2007  Ray Burr"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":"# Permission is hereby granted, free of charge, to any person obtaining a copy"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_09398641","line":16,"updated":"2015-04-03 10:06:26.000000000","message":"Do we need to have this whole file?\n\nIt looks a bit overkill to maintain a tftp implementation, I mean tftp is a well known protocol and there are plenty of libraries implementing it, perhaps we should just use one? \n\nhttps://pypi.python.org/pypi/tftpy","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eeef86f5ae0c7d43cd012b270fe654eb2d8662cb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# This file is based on orginal work as licensed below."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# Copyright (C) 2001,2007  Ray Burr"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":"# Permission is hereby granted, free of charge, to any person obtaining a copy"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_ada2a349","line":16,"in_reply_to":"baa041b7_09398641","updated":"2015-04-03 11:49:03.000000000","message":"++ or lets just call \u0027tftp\u0027 utility.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"7cb454894972177c72ccf983eccebf1ead443eff","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# This file is based on orginal work as licensed below."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# Copyright (C) 2001,2007  Ray Burr"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":"# Permission is hereby granted, free of charge, to any person obtaining a copy"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_205fade6","line":16,"in_reply_to":"baa041b7_ada2a349","updated":"2015-04-03 16:34:38.000000000","message":"My thought here was to avoid an external dependency or requirement to install a package for a pre-flight style check. TFTP is a well known and stable protocol. This code has been around sense 2007 with out modification so I thought the need for maintenance would be quite low or nonexistent. I am however up for other ideas.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"128ae71ad74143d64af24b5e5b6242daa90018a5","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# furnished to do so, subject to the following conditions:"},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# The above copyright notice and this permission notice shall be included in"},{"line_number":27,"context_line":"# all copies or substantial portions of the Software."},{"line_number":28,"context_line":"import fcntl"},{"line_number":29,"context_line":"import os"},{"line_number":30,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_49166ea8","line":27,"updated":"2015-04-03 10:06:26.000000000","message":"This license also makes me worry a bit, are we allowed to include it? I know the license says free of charge to copy, modify, distribute and so on... But I think we should consult someone from the legal department first if we are going this way.\n\nPlus I think that if we include a new license we should also update the LICENSE file in the Ironic root to reflect that. I know that for other licenses we should do that[1]\n\n[1] https://wiki.openstack.org/wiki/LegalIssuesFAQ#Incorporating_BSD.2FMIT_Licensed_Code","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"7cb454894972177c72ccf983eccebf1ead443eff","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# furnished to do so, subject to the following conditions:"},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# The above copyright notice and this permission notice shall be included in"},{"line_number":27,"context_line":"# all copies or substantial portions of the Software."},{"line_number":28,"context_line":"import fcntl"},{"line_number":29,"context_line":"import os"},{"line_number":30,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_e0dd4543","line":27,"in_reply_to":"baa041b7_49166ea8","updated":"2015-04-03 16:34:38.000000000","message":"I did check on this and as the code is MIT licensed adding the apache license is not an issue, also looking at the suggested package above it to is MIT licensed, so I don\u0027t see a licensing advantage here.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"}],"ironic/drivers/modules/pxe.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"180fdbbfb4052730692a44482d8d154cd926f1bb","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        tmp_file \u003d tftp_util.retrieveFile(CONF.pxe.tftp_server,"},{"line_number":344,"context_line":"                                          CONF.pxe.pxe_bootfile_name)"},{"line_number":345,"context_line":"    except Exception:"},{"line_number":346,"context_line":"        LOG.warn(_LW(\"Required service TFTP appears to not be working.\"))"},{"line_number":347,"context_line":"        # if retrieveFile errors we will not get a return so build path to"},{"line_number":348,"context_line":"        # the file we need to remove"},{"line_number":349,"context_line":"        if CONF.tempdir is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_284a4a84","line":346,"updated":"2015-04-06 15:45:54.000000000","message":"I would replace \"appears to be not working\" with a more accurate description of what failed, eg,\n\n\"Unable to validate TFTP configuration by fetching a test file from %{tftpserver}. The %{classname} driver may not be able to perform a deploy until this problem is corrected.\"","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"128ae71ad74143d64af24b5e5b6242daa90018a5","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self):"},{"line_number":363,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":364,"context_line":"        _check_tftp_active()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_properties(self):"},{"line_number":367,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_c9cdde5e","line":364,"updated":"2015-04-03 10:06:26.000000000","message":"Can we check this before the actual deployment instead of only init? The tftp server could die at any time after the Ironic service started.\n\nMaybe even having it on validate() because that\u0027s get called before Ironic start the deployment (setting the provision state) [1]\n\n[1] https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L671-L682","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"180fdbbfb4052730692a44482d8d154cd926f1bb","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self):"},{"line_number":363,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":364,"context_line":"        _check_tftp_active()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_properties(self):"},{"line_number":367,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_c8d51eba","line":364,"in_reply_to":"baa041b7_80f43987","updated":"2015-04-06 15:45:54.000000000","message":"Completely agree with Chris here. \n\ndoing heavy \"are all the dependencies still alive\" checking on every validate() or deploy() call will 1) slow things down, 2) not actually prevent failures, 3) therefor not remove the need for reasonable error checking.\n\nDoing a helpful \"hey, you misconfigured this!\" check during service start is helpful to operators, without having any effect on the service run-time performance or behaviour.  I believe that is the intent here, but perhaps it should be stated more clearly in the commit message.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"7cb454894972177c72ccf983eccebf1ead443eff","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self):"},{"line_number":363,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":364,"context_line":"        _check_tftp_active()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_properties(self):"},{"line_number":367,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_80f43987","line":364,"in_reply_to":"baa041b7_b0e0b6fb","updated":"2015-04-03 16:34:38.000000000","message":"based on comments on the dependent patches, proper error handling should be able to handle run time errors, This is patch is meant to inform an operator for a configuration error upon startup. This is also a heavy test that would impact many operations if it was called from validate. Thus it is only checked at startup.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd74c360dc84063cbcdff1049f8bcd3744d8f1c0","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self):"},{"line_number":363,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":364,"context_line":"        _check_tftp_active()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_properties(self):"},{"line_number":367,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_b0e0b6fb","line":364,"in_reply_to":"baa041b7_c9cdde5e","updated":"2015-04-03 12:09:12.000000000","message":"I agree, any check of this sort should ideally take place as part of validate, which can then appropriately log why a deploy failed.","commit_id":"eb0bd56c179bb264b56ece05daaa8f75c09b9e92"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                     {\u0027tftpserver\u0027: CONF.pxe.tftp_server})"},{"line_number":351,"context_line":"        # if retrieveFile errors we will not get a return so build path to"},{"line_number":352,"context_line":"        # the file we need to remove"},{"line_number":353,"context_line":"        if CONF.tempdir is None:"},{"line_number":354,"context_line":"            path \u003d tempfile.gettempdir()"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            path \u003d CONF.tempdir"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_1fab308b","line":353,"updated":"2015-04-20 13:51:26.000000000","message":"We could just do\n\n if tmp_file:\n     utils.unlink_without_raise(tmp_file)\n\non L360 so that there is no need to construct this tmp_file path","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                     {\u0027tftpserver\u0027: CONF.pxe.tftp_server})"},{"line_number":351,"context_line":"        # if retrieveFile errors we will not get a return so build path to"},{"line_number":352,"context_line":"        # the file we need to remove"},{"line_number":353,"context_line":"        if CONF.tempdir is None:"},{"line_number":354,"context_line":"            path \u003d tempfile.gettempdir()"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            path \u003d CONF.tempdir"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_a25f4940","line":353,"in_reply_to":"dac4157f_1fab308b","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"2561da69d9c17ece1a07542e0ee41726f6912b1f","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def __init__(self):"},{"line_number":367,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":368,"context_line":"        _check_tftp_active()"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def get_properties(self):"},{"line_number":371,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_e5cb6c1d","line":368,"updated":"2015-04-16 21:49:08.000000000","message":"Going to want to check CONF.manage_tftp before doing this.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"12cc00fcc044e84ac8984f876b910d842c17b1dd","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def __init__(self):"},{"line_number":367,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":368,"context_line":"        _check_tftp_active()"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def get_properties(self):"},{"line_number":371,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_148bbbc4","line":368,"in_reply_to":"3ab451fb_e5cb6c1d","updated":"2015-04-22 10:29:54.000000000","message":"+1\n\nAlso iPXE might not need a TFTP","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"}],"ironic/drivers/modules/tftp_util.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"24dce606783aba85c6491182450a7c9a4ed10bbb","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _logPacket(action, data):"},{"line_number":62,"context_line":"    text \u003d string.join(map(lambda x: \"%02X\" % ord(x), data[:16]), \" \")"},{"line_number":63,"context_line":"    if len(data) \u003e 16:"},{"line_number":64,"context_line":"        text \u003d text + (\"... (%d bytes)\" % len(data))"},{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_dd45d517","line":62,"updated":"2015-04-17 10:38:05.000000000","message":"1) string.join() incompatible with PY3, 2) looks like data is bytes but ord() requires unicode char in PY3.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _logPacket(action, data):"},{"line_number":62,"context_line":"    text \u003d string.join(map(lambda x: \"%02X\" % ord(x), data[:16]), \" \")"},{"line_number":63,"context_line":"    if len(data) \u003e 16:"},{"line_number":64,"context_line":"        text \u003d text + (\"... (%d bytes)\" % len(data))"},{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_8c2ca84b","line":62,"updated":"2015-04-17 20:44:23.000000000","message":"Maybe list comprehension instead of map?\n\nThis worked for me in Python 2 and 3:\n\n text \u003d \u0027 \u0027.join([\"%02X\" % ord(x) for x in data[:16]])","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _logPacket(action, data):"},{"line_number":62,"context_line":"    text \u003d string.join(map(lambda x: \"%02X\" % ord(x), data[:16]), \" \")"},{"line_number":63,"context_line":"    if len(data) \u003e 16:"},{"line_number":64,"context_line":"        text \u003d text + (\"... (%d bytes)\" % len(data))"},{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_9bf4b887","line":62,"in_reply_to":"3ab451fb_8c2ca84b","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    text \u003d string.join(map(lambda x: \"%02X\" % ord(x), data[:16]), \" \")"},{"line_number":63,"context_line":"    if len(data) \u003e 16:"},{"line_number":64,"context_line":"        text \u003d text + (\"... (%d bytes)\" % len(data))"},{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class TftpBase:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_1a6e9ec9","line":65,"updated":"2015-04-20 13:51:26.000000000","message":"nit - comma instead of %","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    text \u003d string.join(map(lambda x: \"%02X\" % ord(x), data[:16]), \" \")"},{"line_number":63,"context_line":"    if len(data) \u003e 16:"},{"line_number":64,"context_line":"        text \u003d text + (\"... (%d bytes)\" % len(data))"},{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class TftpBase:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_ee7c1074","line":65,"in_reply_to":"dac4157f_1a6e9ec9","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class TftpBase:"},{"line_number":69,"context_line":"    \"\"\"Tftp base class.\"\"\""},{"line_number":70,"context_line":"    def __init__(self, name):"},{"line_number":71,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_baa0d291","line":68,"updated":"2015-04-20 13:51:26.000000000","message":"Should be inherited from object","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    LOG.debug(\"%-10s %s\" % (action, text))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class TftpBase:"},{"line_number":69,"context_line":"    \"\"\"Tftp base class.\"\"\""},{"line_number":70,"context_line":"    def __init__(self, name):"},{"line_number":71,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_2ed1e857","line":68,"in_reply_to":"dac4157f_baa0d291","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"24dce606783aba85c6491182450a7c9a4ed10bbb","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def makeRequestPacket(self, opcode, name, mode):"},{"line_number":88,"context_line":"        lst \u003d [struct.pack(\"\u003eH\", opcode), name, \"\\0\", mode, \"\\0\"]"},{"line_number":89,"context_line":"        return string.join(lst, \"\")"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def makeAckPacket(self):"},{"line_number":92,"context_line":"        return struct.pack(\"\u003eHH\", ACK, self.blockNumber)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_5dbb050f","line":89,"updated":"2015-04-17 10:38:05.000000000","message":"string.join() incompatible with PY3.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def makeRequestPacket(self, opcode, name, mode):"},{"line_number":88,"context_line":"        lst \u003d [struct.pack(\"\u003eH\", opcode), name, \"\\0\", mode, \"\\0\"]"},{"line_number":89,"context_line":"        return string.join(lst, \"\")"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def makeAckPacket(self):"},{"line_number":92,"context_line":"        return struct.pack(\"\u003eHH\", ACK, self.blockNumber)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_cc1ab017","line":89,"in_reply_to":"3ab451fb_5dbb050f","updated":"2015-04-17 20:44:23.000000000","message":"Can use:\n\n \u0027 \u0027.join(lst)","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def makeRequestPacket(self, opcode, name, mode):"},{"line_number":88,"context_line":"        lst \u003d [struct.pack(\"\u003eH\", opcode), name, \"\\0\", mode, \"\\0\"]"},{"line_number":89,"context_line":"        return string.join(lst, \"\")"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def makeAckPacket(self):"},{"line_number":92,"context_line":"        return struct.pack(\"\u003eHH\", ACK, self.blockNumber)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_0e3bc49d","line":89,"in_reply_to":"3ab451fb_cc1ab017","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def handleTimeout(self):"},{"line_number":139,"context_line":"        now \u003d time.time()"},{"line_number":140,"context_line":"        if now \u003e\u003d self.lastPacketTime + self.maxTimeout:"},{"line_number":141,"context_line":"            LOG.error(\"Tftp operation has timed out\")"},{"line_number":142,"context_line":"            self.done \u003d 1"},{"line_number":143,"context_line":"            raise Exception(\"TFTP timeout\")"},{"line_number":144,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_9a818e92","line":141,"updated":"2015-04-20 13:51:26.000000000","message":"Should translation be added in logging in this file?","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def handleTimeout(self):"},{"line_number":139,"context_line":"        now \u003d time.time()"},{"line_number":140,"context_line":"        if now \u003e\u003d self.lastPacketTime + self.maxTimeout:"},{"line_number":141,"context_line":"            LOG.error(\"Tftp operation has timed out\")"},{"line_number":142,"context_line":"            self.done \u003d 1"},{"line_number":143,"context_line":"            raise Exception(\"TFTP timeout\")"},{"line_number":144,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_ce294c39","line":141,"in_reply_to":"dac4157f_9a818e92","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"24dce606783aba85c6491182450a7c9a4ed10bbb","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        code \u003d 0"},{"line_number":157,"context_line":"        if len(packet) \u003e\u003d 4:"},{"line_number":158,"context_line":"            (code,) \u003d struct.unpack(\"\u003eH\", packet[2:4])"},{"line_number":159,"context_line":"        message \u003d string.replace(packet[4:], \"\\0\", \"\")"},{"line_number":160,"context_line":"        LOG.debug(\"Error code %d: %s\" % (code, message))"},{"line_number":161,"context_line":"        self.done \u003d 1"},{"line_number":162,"context_line":"        raise Exception(message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_fd0bf17b","line":159,"updated":"2015-04-17 10:38:05.000000000","message":"1) string.replace() incompatible with PY3 2) because packet is bytes b\"\\0\" and b\"\" must be used for compatibility with PY3.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        code \u003d 0"},{"line_number":157,"context_line":"        if len(packet) \u003e\u003d 4:"},{"line_number":158,"context_line":"            (code,) \u003d struct.unpack(\"\u003eH\", packet[2:4])"},{"line_number":159,"context_line":"        message \u003d string.replace(packet[4:], \"\\0\", \"\")"},{"line_number":160,"context_line":"        LOG.debug(\"Error code %d: %s\" % (code, message))"},{"line_number":161,"context_line":"        self.done \u003d 1"},{"line_number":162,"context_line":"        raise Exception(message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_27190b89","line":159,"in_reply_to":"3ab451fb_fd0bf17b","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        if len(packet) \u003e\u003d 4:"},{"line_number":158,"context_line":"            (code,) \u003d struct.unpack(\"\u003eH\", packet[2:4])"},{"line_number":159,"context_line":"        message \u003d string.replace(packet[4:], \"\\0\", \"\")"},{"line_number":160,"context_line":"        LOG.debug(\"Error code %d: %s\" % (code, message))"},{"line_number":161,"context_line":"        self.done \u003d 1"},{"line_number":162,"context_line":"        raise Exception(message)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_ba48d22e","line":160,"updated":"2015-04-20 13:51:26.000000000","message":"ditto comma","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        if len(packet) \u003e\u003d 4:"},{"line_number":158,"context_line":"            (code,) \u003d struct.unpack(\"\u003eH\", packet[2:4])"},{"line_number":159,"context_line":"        message \u003d string.replace(packet[4:], \"\\0\", \"\")"},{"line_number":160,"context_line":"        LOG.debug(\"Error code %d: %s\" % (code, message))"},{"line_number":161,"context_line":"        self.done \u003d 1"},{"line_number":162,"context_line":"        raise Exception(message)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_823685e5","line":160,"in_reply_to":"dac4157f_ba48d22e","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":165,"context_line":"class TftpProtocol(TftpBase):"},{"line_number":166,"context_line":"    \"\"\"Tftp download class.\"\"\""},{"line_number":167,"context_line":"    def __init__(self, name):"},{"line_number":168,"context_line":"        apply(TftpBase.__init__, (self, name))"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def getProtocolPacket(self):"},{"line_number":171,"context_line":"        if self.state \u003d\u003d \"start\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_1a58def9","line":168,"updated":"2015-04-20 13:51:26.000000000","message":"ditto apply","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":165,"context_line":"class TftpProtocol(TftpBase):"},{"line_number":166,"context_line":"    \"\"\"Tftp download class.\"\"\""},{"line_number":167,"context_line":"    def __init__(self, name):"},{"line_number":168,"context_line":"        apply(TftpBase.__init__, (self, name))"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def getProtocolPacket(self):"},{"line_number":171,"context_line":"        if self.state \u003d\u003d \"start\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_e27c2174","line":168,"in_reply_to":"dac4157f_1a58def9","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            self.lastSegment \u003d 1"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class SocketIO:"},{"line_number":208,"context_line":"    \"\"\"Socket handler.\"\"\""},{"line_number":209,"context_line":"    def __init__(self, remoteHost):"},{"line_number":210,"context_line":"        self.sendAddr \u003d (remoteHost, 0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_5ab656dd","line":207,"updated":"2015-04-20 13:51:26.000000000","message":"ditto inherit from object","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            self.lastSegment \u003d 1"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class SocketIO:"},{"line_number":208,"context_line":"    \"\"\"Socket handler.\"\"\""},{"line_number":209,"context_line":"    def __init__(self, remoteHost):"},{"line_number":210,"context_line":"        self.sendAddr \u003d (remoteHost, 0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_22ea1910","line":207,"in_reply_to":"dac4157f_5ab656dd","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.sendAddr \u003d (remoteHost, 0)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def sendPacket(self, packet):"},{"line_number":213,"context_line":"        self.sock.sendto(packet, self.sendAddr)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def recvPacket(self, timeout):"},{"line_number":216,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_7a4b5ab1","line":213,"updated":"2015-04-20 13:51:26.000000000","message":"I this one and recvPacket should at least be named with _ in the beginning as they use self.sock which can be not initialized (L238)","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.sendAddr \u003d (remoteHost, 0)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def sendPacket(self, packet):"},{"line_number":213,"context_line":"        self.sock.sendto(packet, self.sendAddr)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def recvPacket(self, timeout):"},{"line_number":216,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_e258a1fc","line":213,"in_reply_to":"dac4157f_7a4b5ab1","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            self.handlePacket(packet, addr)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def transfer(self):"},{"line_number":238,"context_line":"        self.sock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":239,"context_line":"        self.sock.bind((\"\", 0))"},{"line_number":240,"context_line":"        self.sock.setblocking(0)"},{"line_number":241,"context_line":"        self.transferLoop()"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_3ac162e5","line":238,"updated":"2015-04-20 13:51:26.000000000","message":"Maybe initialization can be moved to __init__?","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            self.handlePacket(packet, addr)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def transfer(self):"},{"line_number":238,"context_line":"        self.sock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":239,"context_line":"        self.sock.bind((\"\", 0))"},{"line_number":240,"context_line":"        self.sock.setblocking(0)"},{"line_number":241,"context_line":"        self.transferLoop()"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_c25b5df5","line":238,"in_reply_to":"dac4157f_3ac162e5","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def __init__(self, file, remoteHost, remoteFilename):"},{"line_number":263,"context_line":"        SocketIO.__init__(self, remoteHost)"},{"line_number":264,"context_line":"        apply(TftpProtocol.__init__, (self, remoteFilename))"},{"line_number":265,"context_line":"        self.file \u003d file"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def writeData(self, data):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_3f36f403","line":264,"updated":"2015-04-20 13:51:26.000000000","message":"ditto apply is deprecated.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def __init__(self, file, remoteHost, remoteFilename):"},{"line_number":263,"context_line":"        SocketIO.__init__(self, remoteHost)"},{"line_number":264,"context_line":"        apply(TftpProtocol.__init__, (self, remoteFilename))"},{"line_number":265,"context_line":"        self.file \u003d file"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def writeData(self, data):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_020955dd","line":264,"in_reply_to":"dac4157f_3f36f403","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"24dce606783aba85c6491182450a7c9a4ed10bbb","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    local_filename \u003d os.path.basename(remote_file)"},{"line_number":289,"context_line":"    local_file_full_path \u003d os.path.join(local_path, local_filename)"},{"line_number":290,"context_line":"    file_handle \u003d open(local_file_full_path, \"wb\")"},{"line_number":291,"context_line":"    # ensure we close the file we just opened."},{"line_number":292,"context_line":"    try:"},{"line_number":293,"context_line":"        tftp_obj \u003d apply(Download, (file_handle, remote_host, remote_file))"},{"line_number":294,"context_line":"        tftp_obj.transfer()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_c841953b","line":291,"updated":"2015-04-17 10:38:05.000000000","message":"with open(local_file_full_path, \"wb\") as file_handle:","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"cb320801cd542b0d3dd766476a68d65eddac6816","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    file_handle \u003d open(local_file_full_path, \"wb\")"},{"line_number":291,"context_line":"    # ensure we close the file we just opened."},{"line_number":292,"context_line":"    try:"},{"line_number":293,"context_line":"        tftp_obj \u003d apply(Download, (file_handle, remote_host, remote_file))"},{"line_number":294,"context_line":"        tftp_obj.transfer()"},{"line_number":295,"context_line":"    except Exception:"},{"line_number":296,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_1fb6908a","line":293,"updated":"2015-04-20 13:51:26.000000000","message":"Any reason why to use apply here? Documentation says it is deprecated since python 2.3, and removed in py3.","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e51639cf7e1e126b9a968c57ed44241b094ed655","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    file_handle \u003d open(local_file_full_path, \"wb\")"},{"line_number":291,"context_line":"    # ensure we close the file we just opened."},{"line_number":292,"context_line":"    try:"},{"line_number":293,"context_line":"        tftp_obj \u003d apply(Download, (file_handle, remote_host, remote_file))"},{"line_number":294,"context_line":"        tftp_obj.transfer()"},{"line_number":295,"context_line":"    except Exception:"},{"line_number":296,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"dac4157f_c2291d39","line":293,"in_reply_to":"dac4157f_1fb6908a","updated":"2015-04-21 21:53:15.000000000","message":"Done","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"}],"ironic/tests/drivers/test_pxe.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"class PXEPrivateMethodsTestCase(db_base.DbTestCase):"},{"line_number":120,"context_line":"    @mock.patch.object(pxe, \u0027_check_tftp_active\u0027)"},{"line_number":121,"context_line":"    @mock.patch.object(utils, \u0027check_dir\u0027)"},{"line_number":122,"context_line":"    def setUp(self, mock_check_dir, mock_check_tftp):"},{"line_number":123,"context_line":"        mock_check_dir.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_dd238004","line":120,"updated":"2015-04-17 20:44:23.000000000","message":"add autospec\u003dTrue or False","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        pxe.validate_boot_option_for_uefi(self.node)"},{"line_number":469,"context_line":"        self.assertFalse(mock_log.called)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    @mock.patch.object(tftp_util, \u0027retrieveFile\u0027)"},{"line_number":472,"context_line":"    @mock.patch.object(utils, \u0027unlink_without_raise\u0027)"},{"line_number":473,"context_line":"    @mock.patch.object(LOG, \u0027warn\u0027)"},{"line_number":474,"context_line":"    def test__check_tftp_active(self, mock_log, mock_utils, mock_tftp_util):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_bd20b4f8","line":471,"updated":"2015-04-17 20:44:23.000000000","message":"add autospec\u003dTrue or False","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":498,"context_line":""},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"class PXEDriverTestCase(db_base.DbTestCase):"},{"line_number":501,"context_line":"    @mock.patch.object(pxe, \u0027_check_tftp_active\u0027)"},{"line_number":502,"context_line":"    def setUp(self, mock_check_tftp):"},{"line_number":503,"context_line":"        mock_check_tftp.return_value \u003d None"},{"line_number":504,"context_line":"        super(PXEDriverTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_7d790cfc","line":501,"updated":"2015-04-17 20:44:23.000000000","message":"add autospec\u003dTrue or False","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6800fbcefa36fc6ad171f7df18bc52cac91ab193","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        open(token_path, \u0027w\u0027).close()"},{"line_number":526,"context_line":"        return token_path"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    @mock.patch.object(pxe, \u0027_check_tftp_active\u0027)"},{"line_number":529,"context_line":"    @mock.patch.object(utils, \u0027check_dir\u0027)"},{"line_number":530,"context_line":"    def test_init_calls(self, mock_check_dir, mock_tftp_check):"},{"line_number":531,"context_line":"        mock_check_dir.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ab451fb_5d7e50e5","line":528,"updated":"2015-04-17 20:44:23.000000000","message":"add autospec\u003dTrue or False","commit_id":"535b63c3248e9575f58c01a4c87c5d72d65298c8"}]}
