{"action":"created","comment":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/24033365","id":24033365,"diff_hunk":"@@ -630,25 +630,33 @@ def _generate_template_values(self, ignore=None, skip_lower=True):\n                 del self.template_values[k]\n \n     @handle_deprecated_or_replaced_easyconfig_parameters\n+    def __contains__(self, key):\n+        \"\"\"Check whether easyconfig parameter is defined\"\"\"\n+        return key in self._config\n+\n+    @handle_deprecated_or_replaced_easyconfig_parameters\n     def __getitem__(self, key):\n-        \"\"\"\n-        will return the value without the help text\n-        \"\"\"\n-        value = self._config[key][0]\n+        \"\"\"Return value of specified easyconfig parameter (without help text, etc.)\"\"\"\n+        value = None\n+        if key in self._config:","path":"easybuild/framework/easyconfig/easyconfig.py","position":16,"original_position":16,"commit_id":"6092b24fa856b102dbc8b8e96b523bf55abc3b61","original_commit_id":"6092b24fa856b102dbc8b8e96b523bf55abc3b61","user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"body":"we could just use `key in self`, but then it's rather disconnected from the bit that uses `self._config`...","created_at":"2015-02-03T19:49:09Z","updated_at":"2015-02-03T19:49:09Z","html_url":"https://github.com/hpcugent/easybuild-framework/pull/1155#discussion_r24033365","pull_request_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155","_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/24033365"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1155#discussion_r24033365"},"pull_request":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155"}}},"pull_request":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155","id":28563477,"html_url":"https://github.com/hpcugent/easybuild-framework/pull/1155","diff_url":"https://github.com/hpcugent/easybuild-framework/pull/1155.diff","patch_url":"https://github.com/hpcugent/easybuild-framework/pull/1155.patch","issue_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1155","number":1155,"state":"open","locked":false,"title":"define __contains__ in EasyConfig class","user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"body":"If no `__contains__` is defined, Python falls back to using `__getitem__` for `key in easyconfig_instance` type of expressions (see https://docs.python.org/2/reference/datamodel.html#object.__contains__)\r\n\r\nthis patch fixes the issue that this fails hard if such an expression is used with a non-existing key\r\n\r\nit also makes sure that a decent error message is shown whenever an undefined easyconfig parameter is used (get or set)","created_at":"2015-02-03T15:57:46Z","updated_at":"2015-02-03T19:49:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1d6fca07a7361c538fb23b64b4cb1927854dc39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155/commits","review_comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155/comments","review_comment_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1155/comments","statuses_url":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/6092b24fa856b102dbc8b8e96b523bf55abc3b61","head":{"label":"boegel:EasyConfig_contains","ref":"EasyConfig_contains","sha":"6092b24fa856b102dbc8b8e96b523bf55abc3b61","user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"repo":{"id":4125402,"name":"easybuild-framework","full_name":"boegel/easybuild-framework","owner":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/boegel/easybuild-framework","description":"EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way. ","fork":true,"url":"https://api.github.com/repos/boegel/easybuild-framework","forks_url":"https://api.github.com/repos/boegel/easybuild-framework/forks","keys_url":"https://api.github.com/repos/boegel/easybuild-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boegel/easybuild-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boegel/easybuild-framework/teams","hooks_url":"https://api.github.com/repos/boegel/easybuild-framework/hooks","issue_events_url":"https://api.github.com/repos/boegel/easybuild-framework/issues/events{/number}","events_url":"https://api.github.com/repos/boegel/easybuild-framework/events","assignees_url":"https://api.github.com/repos/boegel/easybuild-framework/assignees{/user}","branches_url":"https://api.github.com/repos/boegel/easybuild-framework/branches{/branch}","tags_url":"https://api.github.com/repos/boegel/easybuild-framework/tags","blobs_url":"https://api.github.com/repos/boegel/easybuild-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boegel/easybuild-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boegel/easybuild-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/boegel/easybuild-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boegel/easybuild-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/boegel/easybuild-framework/languages","stargazers_url":"https://api.github.com/repos/boegel/easybuild-framework/stargazers","contributors_url":"https://api.github.com/repos/boegel/easybuild-framework/contributors","subscribers_url":"https://api.github.com/repos/boegel/easybuild-framework/subscribers","subscription_url":"https://api.github.com/repos/boegel/easybuild-framework/subscription","commits_url":"https://api.github.com/repos/boegel/easybuild-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/boegel/easybuild-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/boegel/easybuild-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/boegel/easybuild-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/boegel/easybuild-framework/contents/{+path}","compare_url":"https://api.github.com/repos/boegel/easybuild-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boegel/easybuild-framework/merges","archive_url":"https://api.github.com/repos/boegel/easybuild-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boegel/easybuild-framework/downloads","issues_url":"https://api.github.com/repos/boegel/easybuild-framework/issues{/number}","pulls_url":"https://api.github.com/repos/boegel/easybuild-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/boegel/easybuild-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/boegel/easybuild-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boegel/easybuild-framework/labels{/name}","releases_url":"https://api.github.com/repos/boegel/easybuild-framework/releases{/id}","created_at":"2012-04-24T14:16:06Z","updated_at":"2014-09-05T23:42:24Z","pushed_at":"2015-02-03T15:57:41Z","git_url":"git://github.com/boegel/easybuild-framework.git","ssh_url":"git@github.com:boegel/easybuild-framework.git","clone_url":"https://github.com/boegel/easybuild-framework.git","svn_url":"https://github.com/boegel/easybuild-framework","homepage":"","size":12512,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"hpcugent:develop","ref":"develop","sha":"a6286f9d2d139c37085516419b37833f2fcf9860","user":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"repo":{"id":3662176,"name":"easybuild-framework","full_name":"hpcugent/easybuild-framework","owner":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcugent/easybuild-framework","description":"EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way. ","fork":false,"url":"https://api.github.com/repos/hpcugent/easybuild-framework","forks_url":"https://api.github.com/repos/hpcugent/easybuild-framework/forks","keys_url":"https://api.github.com/repos/hpcugent/easybuild-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcugent/easybuild-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcugent/easybuild-framework/teams","hooks_url":"https://api.github.com/repos/hpcugent/easybuild-framework/hooks","issue_events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/events{/number}","events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/events","assignees_url":"https://api.github.com/repos/hpcugent/easybuild-framework/assignees{/user}","branches_url":"https://api.github.com/repos/hpcugent/easybuild-framework/branches{/branch}","tags_url":"https://api.github.com/repos/hpcugent/easybuild-framework/tags","blobs_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcugent/easybuild-framework/languages","stargazers_url":"https://api.github.com/repos/hpcugent/easybuild-framework/stargazers","contributors_url":"https://api.github.com/repos/hpcugent/easybuild-framework/contributors","subscribers_url":"https://api.github.com/repos/hpcugent/easybuild-framework/subscribers","subscription_url":"https://api.github.com/repos/hpcugent/easybuild-framework/subscription","commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/hpcugent/easybuild-framework/contents/{+path}","compare_url":"https://api.github.com/repos/hpcugent/easybuild-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcugent/easybuild-framework/merges","archive_url":"https://api.github.com/repos/hpcugent/easybuild-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcugent/easybuild-framework/downloads","issues_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues{/number}","pulls_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcugent/easybuild-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcugent/easybuild-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcugent/easybuild-framework/labels{/name}","releases_url":"https://api.github.com/repos/hpcugent/easybuild-framework/releases{/id}","created_at":"2012-03-08T17:07:43Z","updated_at":"2015-01-30T14:03:55Z","pushed_at":"2015-01-27T19:36:47Z","git_url":"git://github.com/hpcugent/easybuild-framework.git","ssh_url":"git@github.com:hpcugent/easybuild-framework.git","clone_url":"https://github.com/hpcugent/easybuild-framework.git","svn_url":"https://github.com/hpcugent/easybuild-framework","homepage":"http://hpcugent.github.com/easybuild/","size":13747,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":219,"forks":53,"open_issues":219,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1155"},"issue":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1155"},"comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1155/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1155/commits"},"statuses":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/6092b24fa856b102dbc8b8e96b523bf55abc3b61"}}}}