)]}'
{"monsetup/detection/plugins/mysql.py":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"3e6531acfe10f4852abf4be0374f6efa7164678c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                my_user \u003d None"},{"line_number":50,"context_line":"                my_pass \u003d None"},{"line_number":51,"context_line":"                try:"},{"line_number":52,"context_line":"                    cnf \u003d open(\"/root/.my.cnf\", \"r\")"},{"line_number":53,"context_line":"                    for row in cnf:"},{"line_number":54,"context_line":"                        if client_section:"},{"line_number":55,"context_line":"                            if \"[\" in row:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3fe9f9e3","line":52,"updated":"2014-08-05 19:06:12.000000000","message":"Why not using \"with open(\"/root/.my.cnf\") as confFile:\"? Also I would prefer to make the configuration file configurable.","commit_id":"56dafeec4e66b6e15861c58aebc0dcb3ced310d3"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"3e6531acfe10f4852abf4be0374f6efa7164678c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                my_pass \u003d None"},{"line_number":51,"context_line":"                try:"},{"line_number":52,"context_line":"                    cnf \u003d open(\"/root/.my.cnf\", \"r\")"},{"line_number":53,"context_line":"                    for row in cnf:"},{"line_number":54,"context_line":"                        if client_section:"},{"line_number":55,"context_line":"                            if \"[\" in row:"},{"line_number":56,"context_line":"                                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1f9a756f","line":53,"updated":"2014-08-05 19:06:12.000000000","message":"Why not using some Python module instead? SimpleConfigParser or ConfigObj should work.","commit_id":"56dafeec4e66b6e15861c58aebc0dcb3ced310d3"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"be0a8b829a6a39106523e337559c2163cf5e5000","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                my_pass \u003d row.split(\"\u003d\")[1].rstrip().strip(\"\u0027\")"},{"line_number":61,"context_line":"                        if \"[client]\" in row:"},{"line_number":62,"context_line":"                            client_section \u003d True"},{"line_number":63,"context_line":"                    cnf.close()"},{"line_number":64,"context_line":"                    config[\u0027mysql\u0027] \u003d {\u0027init_config\u0027: None, \u0027instances\u0027:"},{"line_number":65,"context_line":"                                       [{\u0027server\u0027: \u0027localhost\u0027, \u0027port\u0027: 3306,"},{"line_number":66,"context_line":"                                         \u0027user\u0027: my_user, \u0027pass\u0027: my_pass}]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_aef38ce5","line":63,"updated":"2014-08-01 18:54:54.000000000","message":"You should close the file in a finally block so it closes whether or not an exception is thrown.","commit_id":"56dafeec4e66b6e15861c58aebc0dcb3ced310d3"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"3e6531acfe10f4852abf4be0374f6efa7164678c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                       [{\u0027server\u0027: \u0027localhost\u0027, \u0027port\u0027: 3306,"},{"line_number":66,"context_line":"                                         \u0027user\u0027: my_user, \u0027pass\u0027: my_pass}]}"},{"line_number":67,"context_line":"                except IOError:"},{"line_number":68,"context_line":"                    pass"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"            if \u0027mysql\u0027 not in config:"},{"line_number":71,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_bfdd0944","line":68,"updated":"2014-08-05 19:06:12.000000000","message":"At least this should log something.","commit_id":"56dafeec4e66b6e15861c58aebc0dcb3ced310d3"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"1411c1b0b4d0b07a04328b60d360c6742942a78e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                my_user \u003d None"},{"line_number":52,"context_line":"                my_pass \u003d None"},{"line_number":53,"context_line":"                try:"},{"line_number":54,"context_line":"                    with open(mysql_conf, \"r\") as confFile:"},{"line_number":55,"context_line":"                        for row in confFile:"},{"line_number":56,"context_line":"                            if client_section:"},{"line_number":57,"context_line":"                                if \"[\" in row:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_ab2cd24b","line":54,"updated":"2014-08-14 18:40:02.000000000","message":"You need to close this file in a finally block of your try/except block.","commit_id":"4c7301570cc186d69fe6179d9fb6ae24106ff10e"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ef84707b2abf46e24ee10522dbd60e75132ff754","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                my_user \u003d None"},{"line_number":52,"context_line":"                my_pass \u003d None"},{"line_number":53,"context_line":"                try:"},{"line_number":54,"context_line":"                    with open(mysql_conf, \"r\") as confFile:"},{"line_number":55,"context_line":"                        for row in confFile:"},{"line_number":56,"context_line":"                            if client_section:"},{"line_number":57,"context_line":"                                if \"[\" in row:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_e620bf9d","line":54,"in_reply_to":"7ac7a964_ab2cd24b","updated":"2014-08-14 19:00:22.000000000","message":"No the with statement takes care of that for you.","commit_id":"4c7301570cc186d69fe6179d9fb6ae24106ff10e"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"74339f67c2cb12034c55627dd8ff7dae09ebd0c5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                my_user \u003d None"},{"line_number":52,"context_line":"                my_pass \u003d None"},{"line_number":53,"context_line":"                try:"},{"line_number":54,"context_line":"                    with open(mysql_conf, \"r\") as confFile:"},{"line_number":55,"context_line":"                        for row in confFile:"},{"line_number":56,"context_line":"                            if client_section:"},{"line_number":57,"context_line":"                                if \"[\" in row:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_a605e7c3","line":54,"in_reply_to":"7ac7a964_e620bf9d","updated":"2014-08-14 19:11:37.000000000","message":"Ok, didn\u0027t realize that.","commit_id":"4c7301570cc186d69fe6179d9fb6ae24106ff10e"}]}
