)]}'
{"monasca_agent/collector/checks_d/nagios_wrapper.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e3afe0e133f0f67f16196e407ca7f6720777c778","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            last_run_data[instance[\u0027name\u0027]] \u003d time.time()"},{"line_number":107,"context_line":"            file_w \u003d open(last_run_file, \"w\")"},{"line_number":108,"context_line":"            pickle.dump(last_run_data, file_w)"},{"line_number":109,"context_line":"            file_w.close()"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        status_code \u003d proc.poll()"},{"line_number":112,"context_line":"        if detail:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_7b3a3938","line":109,"updated":"2015-05-12 22:56:47.000000000","message":"Would it be better to use a \"with\" statement so you don\u0027t have to worry about closing the file. It is possible that an exception could occur when pickling I\u0027m assuming, so therefore it might be better to implicitly close using with.\n\nAlso, if an exception occurs in this block, will it be caught in the stack somewhere, rather than resulting in an exit?","commit_id":"63a96b0d8dee5aee23f6835d3abe8807275c77bc"}]}
