{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-network/pulls/comments/77299857","id":77299857,"diff_hunk":"@@ -214,51 +214,45 @@ def isAnyInterfaceDown\n       down\n     end\n \n+    # Checks local configuration if IPv6 is allowed\n+    #\n+    # return [Boolean] true when IPv6 is allowed\n     def readIPv6\n       @ipv6 = true\n \n-      methods =\n-        #         \"module\" : $[\n-        #                 \"filelist\" : [\"ipv6\", \"50-ipv6.conf\"],\n-        #                 \"filepath\" : \"/etc/modprobe.d/\",\n-        #                 \"regexp\"   : \"^[[:space:]]*(install ipv6 /bin/true)\"\n-        #         ]\n-        {\n-          \"builtin\" => {\n-            \"filelist\" => [\"sysctl.conf\"],\n-            \"filepath\" => \"/etc/\",\n-            \"regexp\"   => \"^[[:space:]]*(net.ipv6.conf.all.disable_ipv6)[[:space:]]*=[[:space:]]*1\"\n-          }\n+      methods = {\n+        \"builtin\" => {\n+          \"filelist\" => [\"sysctl.conf\"],\n+          \"filepath\" => \"/etc\",\n+          \"regexp\"   => /^[[:space:]]*(net.ipv6.conf.all.disable_ipv6)[[:space:]]*=[[:space:]]*1/\n         }\n+      }\n \n-      Builtins.foreach(methods) do |which, method|\n-        filelist = Ops.get_list(method, \"filelist\", [])\n-        filepath = Ops.get_string(method, \"filepath\", \"\")\n-        regexp = Ops.get_string(method, \"regexp\", \"\")\n-        Builtins.foreach(filelist) do |file|\n-          filename = Builtins.sformat(\"%1/%2\", filepath, file)\n-          if FileUtils.Exists(filename)\n-            Builtins.foreach(\n-              Builtins.splitstring(\n-                Convert.to_string(SCR.Read(path(\".target.string\"), filename)),\n-                \"\\n\"\n-              )\n-            ) do |row|\n-              if Ops.greater_than(\n-                Builtins.size(\n-                  Builtins.regexptokenize(String.CutBlanks(row), regexp)\n-                ),\n-                0\n-              )\n-                Builtins.y2milestone(\"IPv6 is disabled by '%1' method.\", which)\n-                @ipv6 = false\n-              end\n-            end\n+      methods.each do |_, method|\n+        filelist = method[\"filelist\"] || []\n+        filepath = method[\"filepath\"] || \"\"\n+        regexp = method[\"regexp\"] || \"\"\n+\n+        filelist.each do |file|\n+          filename = \"#{filepath}/#{file}\"\n+          next if !FileUtils.Exists(filename)\n+\n+          begin\n+            lines = (SCR.Read(path(\".target.string\"), filename) || []).split(\"\\n\")\n+          rescue ArgumentError => e\n+            log.error(\"readIPv6: an error when parsing #{filename}\")\n+            log.error(e.message)\n+\n+            return false","path":"src/modules/Lan.rb","position":68,"original_position":68,"commit_id":"99f4469a22b59e0584fe256a66629e9c2c8db174","original_commit_id":"99f4469a22b59e0584fe256a66629e9c2c8db174","user":{"login":"jreidinger","id":478871,"avatar_url":"https://avatars.githubusercontent.com/u/478871?v=3","gravatar_id":"","url":"https://api.github.com/users/jreidinger","html_url":"https://github.com/jreidinger","followers_url":"https://api.github.com/users/jreidinger/followers","following_url":"https://api.github.com/users/jreidinger/following{/other_user}","gists_url":"https://api.github.com/users/jreidinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jreidinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreidinger/subscriptions","organizations_url":"https://api.github.com/users/jreidinger/orgs","repos_url":"https://api.github.com/users/jreidinger/repos","events_url":"https://api.github.com/users/jreidinger/events{/privacy}","received_events_url":"https://api.github.com/users/jreidinger/received_events","type":"User","site_admin":false},"body":"so if we cannot parse then silently expect it is false? what about exception or popup mentioning, that given file cannot be parse as it contain something wrong?","created_at":"2016-09-02T06:38:40Z","updated_at":"2016-09-02T06:38:40Z","html_url":"https://github.com/yast/yast-network/pull/433#discussion_r77299857","pull_request_url":"https://api.github.com/repos/yast/yast-network/pulls/433","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-network/pulls/comments/77299857"},"html":{"href":"https://github.com/yast/yast-network/pull/433#discussion_r77299857"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-network/pulls/433"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-network/pulls/433","id":83701595,"html_url":"https://github.com/yast/yast-network/pull/433","diff_url":"https://github.com/yast/yast-network/pull/433.diff","patch_url":"https://github.com/yast/yast-network/pull/433.patch","issue_url":"https://api.github.com/repos/yast/yast-network/issues/433","number":433,"state":"open","locked":false,"title":"Handle errors related to non utf-8 characters in /etc/sysctl.conf more carefully","user":{"login":"mchf","id":1579239,"avatar_url":"https://avatars.githubusercontent.com/u/1579239?v=3","gravatar_id":"","url":"https://api.github.com/users/mchf","html_url":"https://github.com/mchf","followers_url":"https://api.github.com/users/mchf/followers","following_url":"https://api.github.com/users/mchf/following{/other_user}","gists_url":"https://api.github.com/users/mchf/gists{/gist_id}","starred_url":"https://api.github.com/users/mchf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchf/subscriptions","organizations_url":"https://api.github.com/users/mchf/orgs","repos_url":"https://api.github.com/users/mchf/repos","events_url":"https://api.github.com/users/mchf/events{/privacy}","received_events_url":"https://api.github.com/users/mchf/received_events","type":"User","site_admin":false},"body":"bnc#992821\r\n\r\nThis should be merged into master/SP3 branch only once SP2 is forked off","created_at":"2016-09-01T20:31:53Z","updated_at":"2016-09-02T06:38:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49fb1b670a6e4bacd66bdf7b1c355e8aa7cc3331","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-network/pulls/433/commits","review_comments_url":"https://api.github.com/repos/yast/yast-network/pulls/433/comments","review_comment_url":"https://api.github.com/repos/yast/yast-network/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-network/issues/433/comments","statuses_url":"https://api.github.com/repos/yast/yast-network/statuses/99f4469a22b59e0584fe256a66629e9c2c8db174","head":{"label":"mchf:bnc992821-internal-error-utf8","ref":"bnc992821-internal-error-utf8","sha":"99f4469a22b59e0584fe256a66629e9c2c8db174","user":{"login":"mchf","id":1579239,"avatar_url":"https://avatars.githubusercontent.com/u/1579239?v=3","gravatar_id":"","url":"https://api.github.com/users/mchf","html_url":"https://github.com/mchf","followers_url":"https://api.github.com/users/mchf/followers","following_url":"https://api.github.com/users/mchf/following{/other_user}","gists_url":"https://api.github.com/users/mchf/gists{/gist_id}","starred_url":"https://api.github.com/users/mchf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchf/subscriptions","organizations_url":"https://api.github.com/users/mchf/orgs","repos_url":"https://api.github.com/users/mchf/repos","events_url":"https://api.github.com/users/mchf/events{/privacy}","received_events_url":"https://api.github.com/users/mchf/received_events","type":"User","site_admin":false},"repo":{"id":4748313,"name":"yast-network","full_name":"mchf/yast-network","owner":{"login":"mchf","id":1579239,"avatar_url":"https://avatars.githubusercontent.com/u/1579239?v=3","gravatar_id":"","url":"https://api.github.com/users/mchf","html_url":"https://github.com/mchf","followers_url":"https://api.github.com/users/mchf/followers","following_url":"https://api.github.com/users/mchf/following{/other_user}","gists_url":"https://api.github.com/users/mchf/gists{/gist_id}","starred_url":"https://api.github.com/users/mchf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchf/subscriptions","organizations_url":"https://api.github.com/users/mchf/orgs","repos_url":"https://api.github.com/users/mchf/repos","events_url":"https://api.github.com/users/mchf/events{/privacy}","received_events_url":"https://api.github.com/users/mchf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mchf/yast-network","description":"YaST module network","fork":true,"url":"https://api.github.com/repos/mchf/yast-network","forks_url":"https://api.github.com/repos/mchf/yast-network/forks","keys_url":"https://api.github.com/repos/mchf/yast-network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mchf/yast-network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mchf/yast-network/teams","hooks_url":"https://api.github.com/repos/mchf/yast-network/hooks","issue_events_url":"https://api.github.com/repos/mchf/yast-network/issues/events{/number}","events_url":"https://api.github.com/repos/mchf/yast-network/events","assignees_url":"https://api.github.com/repos/mchf/yast-network/assignees{/user}","branches_url":"https://api.github.com/repos/mchf/yast-network/branches{/branch}","tags_url":"https://api.github.com/repos/mchf/yast-network/tags","blobs_url":"https://api.github.com/repos/mchf/yast-network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mchf/yast-network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mchf/yast-network/git/refs{/sha}","trees_url":"https://api.github.com/repos/mchf/yast-network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mchf/yast-network/statuses/{sha}","languages_url":"https://api.github.com/repos/mchf/yast-network/languages","stargazers_url":"https://api.github.com/repos/mchf/yast-network/stargazers","contributors_url":"https://api.github.com/repos/mchf/yast-network/contributors","subscribers_url":"https://api.github.com/repos/mchf/yast-network/subscribers","subscription_url":"https://api.github.com/repos/mchf/yast-network/subscription","commits_url":"https://api.github.com/repos/mchf/yast-network/commits{/sha}","git_commits_url":"https://api.github.com/repos/mchf/yast-network/git/commits{/sha}","comments_url":"https://api.github.com/repos/mchf/yast-network/comments{/number}","issue_comment_url":"https://api.github.com/repos/mchf/yast-network/issues/comments{/number}","contents_url":"https://api.github.com/repos/mchf/yast-network/contents/{+path}","compare_url":"https://api.github.com/repos/mchf/yast-network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mchf/yast-network/merges","archive_url":"https://api.github.com/repos/mchf/yast-network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mchf/yast-network/downloads","issues_url":"https://api.github.com/repos/mchf/yast-network/issues{/number}","pulls_url":"https://api.github.com/repos/mchf/yast-network/pulls{/number}","milestones_url":"https://api.github.com/repos/mchf/yast-network/milestones{/number}","notifications_url":"https://api.github.com/repos/mchf/yast-network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mchf/yast-network/labels{/name}","releases_url":"https://api.github.com/repos/mchf/yast-network/releases{/id}","deployments_url":"https://api.github.com/repos/mchf/yast-network/deployments","created_at":"2012-06-22T06:44:13Z","updated_at":"2015-05-06T13:22:26Z","pushed_at":"2016-09-01T20:46:50Z","git_url":"git://github.com/mchf/yast-network.git","ssh_url":"git@github.com:mchf/yast-network.git","clone_url":"https://github.com/mchf/yast-network.git","svn_url":"https://github.com/mchf/yast-network","homepage":"http://en.opensuse.org/Portal:YaST","size":24500,"stargazers_count":1,"watchers_count":1,"language":"Ruby","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":1,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"bb8074faa5ea6a742f30ddc002f6c0b815de5c7b","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368160,"name":"yast-network","full_name":"yast/yast-network","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-network","description":"YaST module network","fork":false,"url":"https://api.github.com/repos/yast/yast-network","forks_url":"https://api.github.com/repos/yast/yast-network/forks","keys_url":"https://api.github.com/repos/yast/yast-network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-network/teams","hooks_url":"https://api.github.com/repos/yast/yast-network/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-network/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-network/events","assignees_url":"https://api.github.com/repos/yast/yast-network/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-network/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-network/tags","blobs_url":"https://api.github.com/repos/yast/yast-network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-network/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-network/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-network/languages","stargazers_url":"https://api.github.com/repos/yast/yast-network/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-network/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-network/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-network/subscription","commits_url":"https://api.github.com/repos/yast/yast-network/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-network/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-network/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-network/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-network/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-network/merges","archive_url":"https://api.github.com/repos/yast/yast-network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-network/downloads","issues_url":"https://api.github.com/repos/yast/yast-network/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-network/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-network/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-network/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-network/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-network/deployments","created_at":"2012-05-18T10:24:50Z","updated_at":"2016-08-23T07:35:16Z","pushed_at":"2016-09-01T20:46:50Z","git_url":"git://github.com/yast/yast-network.git","ssh_url":"git@github.com:yast/yast-network.git","clone_url":"https://github.com/yast/yast-network.git","svn_url":"https://github.com/yast/yast-network","homepage":"http://en.opensuse.org/Portal:YaST","size":24555,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":3,"forks":21,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-network/pulls/433"},"html":{"href":"https://github.com/yast/yast-network/pull/433"},"issue":{"href":"https://api.github.com/repos/yast/yast-network/issues/433"},"comments":{"href":"https://api.github.com/repos/yast/yast-network/issues/433/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-network/pulls/433/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-network/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-network/pulls/433/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-network/statuses/99f4469a22b59e0584fe256a66629e9c2c8db174"}}}}
{"actor":{"display_login":"jreidinger"}}