{"action":"created","issue":{"url":"https://api.github.com/repos/deis/deis/issues/4720","labels_url":"https://api.github.com/repos/deis/deis/issues/4720/labels{/name}","comments_url":"https://api.github.com/repos/deis/deis/issues/4720/comments","events_url":"https://api.github.com/repos/deis/deis/issues/4720/events","html_url":"https://github.com/deis/deis/pull/4720","id":115393948,"number":4720,"title":"fix(create_bucket): check for existence of None","user":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/deis/deis/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/deis/deis/labels/Code%20LGTM1","name":"Code LGTM1","color":"009800"},{"url":"https://api.github.com/repos/deis/deis/labels/Code%20LGTM2","name":"Code LGTM2","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/deis/deis/milestones/50","html_url":"https://github.com/deis/deis/milestones/v1.12.1","labels_url":"https://api.github.com/repos/deis/deis/milestones/50/labels","id":1396669,"number":50,"title":"v1.12.1","description":"","creator":{"login":"carmstrong","id":536009,"avatar_url":"https://avatars.githubusercontent.com/u/536009?v=3","gravatar_id":"","url":"https://api.github.com/users/carmstrong","html_url":"https://github.com/carmstrong","followers_url":"https://api.github.com/users/carmstrong/followers","following_url":"https://api.github.com/users/carmstrong/following{/other_user}","gists_url":"https://api.github.com/users/carmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/carmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmstrong/subscriptions","organizations_url":"https://api.github.com/users/carmstrong/orgs","repos_url":"https://api.github.com/users/carmstrong/repos","events_url":"https://api.github.com/users/carmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/carmstrong/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-11-05T23:28:33Z","updated_at":"2015-11-06T00:53:18Z","due_on":"2015-11-09T05:00:00Z","closed_at":null},"comments":2,"created_at":"2015-11-05T22:53:55Z","updated_at":"2015-11-06T17:37:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/deis/deis/pulls/4720","html_url":"https://github.com/deis/deis/pull/4720","diff_url":"https://github.com/deis/deis/pull/4720.diff","patch_url":"https://github.com/deis/deis/pull/4720.patch"},"body":"There are small implications between `if not x` and `if x is None` in\r\nPython:\r\n\r\n - `if not x` checks if the value is false (empty list, `None`, `False`)\r\n - `if x is None` checks if x is equal to the literal value `None`.\r\n\r\nconn.lookup returns `None` if no bucket exists. This code is explicitly\r\nstated in their docs as the proper way to check if a bucket does not\r\nexist.\r\n\r\nSee: http://boto.readthedocs.org/en/latest/s3_tut.html\r\n\r\nI'm not sure how the original issue is caused, but this will likely\r\nresolve it.\r\n\r\ncloses #4713 \r\n\r\nping @lukasmartinelli and @afterthought. Would you mind verifying that this patch works for you?"},"comment":{"url":"https://api.github.com/repos/deis/deis/issues/comments/154481178","html_url":"https://github.com/deis/deis/pull/4720#issuecomment-154481178","issue_url":"https://api.github.com/repos/deis/deis/issues/4720","id":154481178,"user":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T17:37:34Z","updated_at":"2015-11-06T17:37:34Z","body":"@obmarg I think the next step is figuring out what's causing the root issue in #4713. Regardless, this technically is an improvement if this is the \"recommended\" way of checking for presence of a bucket."}}