)]}'
{"octavia/amphorae/backends/agent/api_server/osutils.py":[{"author":{"_account_id":2245,"name":"Jacky Hu","email":"hudayou@hotmail.com","username":"hudayou"},"change_message_id":"3fc37336235fe681fc7351d1a99e5d64f4b084b6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            os.makedirs(\u0027/etc/netns/\u0027 + consts.AMPHORA_NAMESPACE)"},{"line_number":83,"context_line":"        except OSError as e:"},{"line_number":84,"context_line":"            # Raise the error if it\u0027s not \"File exists\" otherwise pass"},{"line_number":85,"context_line":"            if e.errno !\u003d 17:"},{"line_number":86,"context_line":"                raise"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        shutil.copytree("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3a8cc037","line":85,"updated":"2018-11-08 06:29:48.000000000","message":"17 looks like magic, errno.EEXIST might work for the same purpose","commit_id":"ef14c35ddf7049929086a5c26014d5f3e20204ef"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"c02f6965724a059f002e8cac0dba64a0dc99b298","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            os.makedirs(\u0027/etc/netns/\u0027 + consts.AMPHORA_NAMESPACE)"},{"line_number":83,"context_line":"        except OSError as e:"},{"line_number":84,"context_line":"            # Raise the error if it\u0027s not \"File exists\" otherwise pass"},{"line_number":85,"context_line":"            if e.errno !\u003d 17:"},{"line_number":86,"context_line":"                raise"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        shutil.copytree("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_0c80af48","line":85,"in_reply_to":"3f79a3b5_3a8cc037","updated":"2018-11-08 10:23:24.000000000","message":"Bummer, Python 3.2+ added exist_ok parameter to makedirs (https://docs.python.org/3/library/os.html#os.makedirs).\n\nI\u0027m not a fan of explicitly setting error number. Either errno.EEXIST as Jacky mentioned or we could refactor this so that we check if directory exists prior to trying to create it.","commit_id":"ef14c35ddf7049929086a5c26014d5f3e20204ef"}]}
