)]}'
{"keystone/backends/__init__.py":[{"author":{"_account_id":1801,"name":"Duncan McGreggor","email":"duncan.mcgreggor@rackspace.com","username":"oubiwann"},"change_message_id":"96293fa389f69f21f8fa5aa2355fcd937d8e6f5c","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    #Initialize common configs general to all backends."},{"line_number":37,"context_line":"    global SHOULD_HASH_PASSWORD"},{"line_number":38,"context_line":"    if \"hash-password\" in options\\"},{"line_number":39,"context_line":"        and ast.literal_eval(options[\"hash-password\"]):"},{"line_number":40,"context_line":"        SHOULD_HASH_PASSWORD \u003d options[\"hash-password\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2Bvk%3D","line":38,"updated":"2012-01-04 04:50:02.000000000","message":"The backslashes are actually discouraged as a means of continuing long lines these days. Instead, the code should be wrapped in parens. See the following for more info:\n  http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#long-lines-continuations","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"f8a4c4521a7cec3fca4a8b4877f7d703e919f9f1","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    #Initialize common configs general to all backends."},{"line_number":37,"context_line":"    global SHOULD_HASH_PASSWORD"},{"line_number":38,"context_line":"    if \"hash-password\" in options\\"},{"line_number":39,"context_line":"        and ast.literal_eval(options[\"hash-password\"]):"},{"line_number":40,"context_line":"        SHOULD_HASH_PASSWORD \u003d options[\"hash-password\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2BvU%3D","line":38,"in_reply_to":"AAAADH%2F%2F%2Bvk%3D","updated":"2012-01-04 05:19:57.000000000","message":"Got it Duncan","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"dadf7f69b3171e8a406543f3b17d90945560cc42","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    #Initialize common configs general to all backends."},{"line_number":37,"context_line":"    global SHOULD_HASH_PASSWORD"},{"line_number":38,"context_line":"    if \"hash-password\" in options\\"},{"line_number":39,"context_line":"        and ast.literal_eval(options[\"hash-password\"]):"},{"line_number":40,"context_line":"        SHOULD_HASH_PASSWORD \u003d options[\"hash-password\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2BwE%3D","line":39,"updated":"2012-01-04 04:30:08.000000000","message":"The return value of literal_eval is an evaluation of a expression object to a Python expression. Therefore, it is trying to evaluate the return value rather than check if it is or isn\u0027t True","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"}],"keystone/backends/backendutils.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"dadf7f69b3171e8a406543f3b17d90945560cc42","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    if backends.SHOULD_HASH_PASSWORD:"},{"line_number":19,"context_line":"        if isinstance(values, dict) and \u0027password\u0027 in values.keys():"},{"line_number":20,"context_line":"            values[\u0027password\u0027] \u003d __get_hashed_password(values[\u0027password\u0027])"},{"line_number":21,"context_line":"        elif isinstance(values, models.User):"},{"line_number":22,"context_line":"            values.password \u003d __get_hashed_password(values.password)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2Bv8%3D","line":21,"updated":"2012-01-04 04:30:08.000000000","message":"The super class of models.User is sqlalchemy\u0027s BASE and models.KeystoneBASE, both which only remain inside the models module. There won\u0027t be a case where they would be passed as values.","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"}],"keystone/common/template.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"dadf7f69b3171e8a406543f3b17d90945560cc42","unresolved":false,"context_lines":[{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"},{"line_number":330,"context_line":"    lm \u003d time.strftime(\"%a, %d %b %Y %H:%M:%S GMT\","}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2Bv0%3D","side":"PARENT","line":327,"updated":"2012-01-04 04:30:08.000000000","message":"I\u0027m not sure why download is first compared with True and then evaluated.\n\nSince download is passed as True or False, I thought it should be evaluated rather than compared with True.","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":5,"name":"Ziad Sawalha","email":"ziad.sawalha@rackspace.com","username":"ziad-sawalha"},"change_message_id":"1b5417f615b53e31a9fd620afae6a84c4de83677","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2BvI%3D","side":"PARENT","line":326,"updated":"2012-01-04 05:56:49.000000000","message":"\u003e\u003e\u003e bool(os.path.basename(\u0027/\u0027))\nFalse\n\nThe second check is needed in case the filename is missing","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":5,"name":"Ziad Sawalha","email":"ziad.sawalha@rackspace.com","username":"ziad-sawalha"},"change_message_id":"c7015890a74d757e9da04a97e6be97c9d5588886","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2BpI%3D","side":"PARENT","line":326,"in_reply_to":"AAAADH%2F%2F%2Bt4%3D","updated":"2012-01-04 14:43:54.000000000","message":"The change in line 324 is fine. I was only concerned about changing the logic and conditions under which line 327 gets evaluated.\nThat goes beyond \"PEP8 keystone cleanup\".\n\nI see your point about the filename being verified above and I appreciate your contribution.","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"874e9fc780852b0556fceb05dc5b354746a314c3","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2Bt4%3D","side":"PARENT","line":326,"in_reply_to":"AAAADH%2F%2F%2BuM%3D","updated":"2012-01-04 07:26:34.000000000","message":"My point is that this piece of code violates PEP8. If it is not to be strictly followed, I don\u0027t see the point contributing to open-source code.\n\nAnd with all due respect, what is so complicated about this code that it should be kept this way?\n\nI know that downloaded is not guaranteed as True or False but letting it evaluate \"download\" covers what the original code should do. Also the file path is already checked if it is a file that exists.\n\nSo I\u0027m just suggesting for downloaded to be evaluated and let the already-verified filename get added to the string.","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":5,"name":"Ziad Sawalha","email":"ziad.sawalha@rackspace.com","username":"ziad-sawalha"},"change_message_id":"265476ac2861af9bee5a7c2606f0b293bc4ba2bd","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2BuM%3D","side":"PARENT","line":326,"in_reply_to":"AAAADH%2F%2F%2BuY%3D","updated":"2012-01-04 07:04:55.000000000","message":"We don\u0027t check or guarantee we got True or False.\n\nThis code came from bottlepy, so I\u0027m not that familiar with it (a good reason not to change it without a known bug)","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"efd575bb4d1a557f99666c8ea88903dcc27b3a5f","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2BuY%3D","side":"PARENT","line":326,"in_reply_to":"AAAADH%2F%2F%2BvI%3D","updated":"2012-01-04 06:27:11.000000000","message":"I thought since download is passed as True or False, I thought it should be evaluated rather than compared with True.","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"5c1949a159d02a32850f30b91af6f1625db5c7c8","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if download \u003d\u003d True:"},{"line_number":325,"context_line":"        download \u003d os.path.basename(filename)"},{"line_number":326,"context_line":"    if download:"},{"line_number":327,"context_line":"        resp.content_disposition \u003d \u0027attachment; filename\u003d\"%s\"\u0027 % download"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    stats \u003d os.stat(filename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAADH%2F%2F%2Bu4%3D","side":"PARENT","line":326,"in_reply_to":"AAAADH%2F%2F%2BvI%3D","updated":"2012-01-04 06:03:41.000000000","message":"oh now I get it. I think I have an idea to make it look better.","commit_id":"c26a1dfcf3f7d0b163f23926042b95f3bf501e9f"}],"keystone/test/__init__.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"dadf7f69b3171e8a406543f3b17d90945560cc42","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        self.construct_temp_conf_file()"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        # Set client certificate for test client"},{"line_number":403,"context_line":"        if self.isSsl:"},{"line_number":404,"context_line":"            logger.debug(\"SSL testing will use cert_file %s\" % TEST_CERT)"},{"line_number":405,"context_line":"            os.environ[\u0027cert_file\u0027] \u003d TEST_CERT"},{"line_number":406,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2Bvw%3D","line":403,"updated":"2012-01-04 04:30:08.000000000","message":"isSsl is True or False.","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"}],"tools/validate_json.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"dadf7f69b3171e8a406543f3b17d90945560cc42","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    try:"},{"line_number":61,"context_line":"        contents \u003d read_file(path)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        if contents is False:"},{"line_number":64,"context_line":"            logging.warning(\u0027Insufficient permissions to open: %s\u0027 % path)"},{"line_number":65,"context_line":"            return False"},{"line_number":66,"context_line":"    except:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAADH%2F%2F%2Bvs%3D","line":63,"updated":"2012-01-04 04:30:08.000000000","message":"if you look at the source code of read_file, only False is returned when permission is denied. Therefore, contents should be compared with False rather than being evaluated.","commit_id":"fd59dc455c9f939a0788fcdcd1645f1763e90a39"}]}
