{"action":"created","comment":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/25345910","id":25345910,"diff_hunk":"@@ -133,76 +100,112 @@ def get_core_count():\n \n \n def get_cpu_vendor():\n-    \"\"\"Try to detect the cpu identifier\n+    \"\"\"\n+    Try to detect the CPU vendor\n \n-    will return INTEL, ARM or AMD constant\n+    @return: INTEL, ARM or AMD constant\n     \"\"\"\n-    regexp = re.compile(r\"^vendor_id\\s+:\\s*(?P<vendorid>\\S+)\\s*$\", re.M)\n-    VENDORS = {\n-        'GenuineIntel': INTEL,\n-        'AuthenticAMD': AMD,\n-    }\n+    vendor = None\n     os_type = get_os_type()\n \n-    if os_type == LINUX:\n-        try:\n-            txt = read_file('/proc/cpuinfo', log_error=False)\n-            arch = UNKNOWN\n-            # vendor_id might not be in the /proc/cpuinfo, so this might fail\n-            res = regexp.search(txt)\n-            if res:\n-                arch = res.groupdict().get('vendorid', UNKNOWN)\n-            if arch in VENDORS:\n-                return VENDORS[arch]\n-\n-            # some embeded linux on arm behaves differently (e.g. raspbian)\n-            regexp = re.compile(r\"^Processor\\s+:\\s*(?P<vendorid>ARM\\S+)\\s*\", re.M)\n-            res = regexp.search(txt)\n-            if res:\n-                arch = res.groupdict().get('vendorid', UNKNOWN)\n-            if ARM in arch:\n-                return ARM\n-        except IOError, err:\n-            raise SystemToolsException(\"An error occured while determining CPU vendor since: %s\" % err)\n+    if os_type == LINUX and os.path.exists(PROC_CPUINFO_FP):\n+        txt = read_file(PROC_CPUINFO_FP)\n+        arch = UNKNOWN\n+\n+        # vendor_id might not be in the /proc/cpuinfo, so this might fail\n+        vendor_regex = re.compile(r\"^vendor_id\\s+:\\s*(?P<vendorid>\\S+)\\s*$\", re.M)","path":"easybuild/tools/systemtools.py","position":157,"original_position":157,"commit_id":"297dea1641208a8999a4c55304a718878668f2c1","original_commit_id":"297dea1641208a8999a4c55304a718878668f2c1","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":"whether we compile or not, it's going to be compiled anyway ;)\r\n\r\nby compiling it in `vendor_regex`, I have a handle to use it both in `vendor_regex.search` and in `log.debug`, which is handy","created_at":"2015-02-25T15:06:28Z","updated_at":"2015-02-25T15:06:28Z","html_url":"https://github.com/hpcugent/easybuild-framework/pull/1044#discussion_r25345910","pull_request_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044","_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/25345910"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1044#discussion_r25345910"},"pull_request":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044"}}},"pull_request":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044","id":21165914,"html_url":"https://github.com/hpcugent/easybuild-framework/pull/1044","diff_url":"https://github.com/hpcugent/easybuild-framework/pull/1044.diff","patch_url":"https://github.com/hpcugent/easybuild-framework/pull/1044.patch","issue_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1044","number":1044,"state":"open","locked":false,"title":"enhance systemtools.py to also support POWER systems","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":"fixes issues reported in https://github.com/hpcugent/easybuild/issues/32 by @chwilk","created_at":"2014-09-12T17:11:27Z","updated_at":"2015-02-25T15:06:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd3a9fcffc6dc795159a300ea46daa964e849f0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044/commits","review_comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044/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/1044/comments","statuses_url":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/297dea1641208a8999a4c55304a718878668f2c1","head":{"label":"boegel:systemtools_fixes_power","ref":"systemtools_fixes_power","sha":"297dea1641208a8999a4c55304a718878668f2c1","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-25T12:17:26Z","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":13163,"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":"f2d7b3fd28add53fad4a67d8eb23bde3cc485b1f","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-02-24T16:06:01Z","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":15272,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":227,"forks":54,"open_issues":227,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1044"},"issue":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1044"},"comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1044/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1044/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/1044/commits"},"statuses":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/297dea1641208a8999a4c55304a718878668f2c1"}}}}