{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-network/pulls/comments/44113615","id":44113615,"diff_hunk":"@@ -1831,28 +1832,49 @@ global map FindMatchingDevice(map interface) {\n     return tosel;\n }\n \n-global void DeleteItem(){\n- y2milestone(\"deleting ... %1\", Items[current]:$[]);\n- string ifcfg = Items[current, \"ifcfg\"]:\"\";\n- string hwcfg = Items[current, \"hwcfg\"]:\"\";\n+global void DeleteItem()\n+{\n+    y2milestone(\"deleting ... %1\", Items[current]:$[]);\n \n- if (IsNotEmpty(ifcfg)) {\n-\t NetworkInterfaces::Delete(ifcfg);\n-\t NetworkInterfaces::Commit();\n-\t Items[current, \"ifcfg\"] = \"\";\n-\t}\n- if (! (size(Items[current, \"hwinfo\"]:$[])>0) ){\n-  map<integer, any> tmp_items = $[];\n-  foreach(integer key, any value, Items, {\n-   if (key==current) continue;\n-    else{\n-\tif (key<current) tmp_items[key]=Items[key]:$[];\n-\t\telse tmp_items[key-1]=Items[key]:$[];\n-\t}\n-  });\n-  Items = tmp_items;\n- }\n- SetModified();\n+    string ifcfg = Items[current, \"ifcfg\"]:\"\";\n+    string hwcfg = Items[current, \"hwcfg\"]:\"\";\n+\n+    if (IsNotEmpty(ifcfg))\n+    {\n+        NetworkInterfaces::Delete(ifcfg);\n+\n+        // this depends on above NetworkInterfaces::Delete","path":"src/modules/LanItems.ycp","position":44,"original_position":44,"commit_id":"c0c1cdfc56e8bc5fc1964ee41cfc412ee8417e95","original_commit_id":"c0c1cdfc56e8bc5fc1964ee41cfc412ee8417e95","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":"hm, I've overlooked the ```Select``` in ```GetValue```, so the comment is useless.\r\n\r\nNo problem to add another level of ```if``` is no problem, so I'll adapt it.","created_at":"2015-11-06T08:26:15Z","updated_at":"2015-11-06T08:26:15Z","html_url":"https://github.com/yast/yast-network/pull/352#discussion_r44113615","pull_request_url":"https://api.github.com/repos/yast/yast-network/pulls/352","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-network/pulls/comments/44113615"},"html":{"href":"https://github.com/yast/yast-network/pull/352#discussion_r44113615"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-network/pulls/352"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-network/pulls/352","id":49921674,"html_url":"https://github.com/yast/yast-network/pull/352","diff_url":"https://github.com/yast/yast-network/pull/352.diff","patch_url":"https://github.com/yast/yast-network/pull/352.patch","issue_url":"https://api.github.com/repos/yast/yast-network/issues/352","number":352,"state":"open","locked":false,"title":"Clear hostname from /etc/hosts when deleting nic config","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#951330","created_at":"2015-11-06T06:53:18Z","updated_at":"2015-11-06T08:26:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5878f9a5694d90a46abd0f3474eaa0fc5fbcfad3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-network/pulls/352/commits","review_comments_url":"https://api.github.com/repos/yast/yast-network/pulls/352/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/352/comments","statuses_url":"https://api.github.com/repos/yast/yast-network/statuses/c0c1cdfc56e8bc5fc1964ee41cfc412ee8417e95","head":{"label":"mchf:bnc951330-etc-hosts","ref":"bnc951330-etc-hosts","sha":"c0c1cdfc56e8bc5fc1964ee41cfc412ee8417e95","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}","created_at":"2012-06-22T06:44:13Z","updated_at":"2015-05-06T13:22:26Z","pushed_at":"2015-11-06T08:01:41Z","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":26096,"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:Code-11-SP4","ref":"Code-11-SP4","sha":"12027f343b1ccb750bc57c9f57c7eeb9d4a81208","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}","created_at":"2012-05-18T10:24:50Z","updated_at":"2015-09-20T18:17:24Z","pushed_at":"2015-11-06T06:53:18Z","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":25693,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":1,"forks":17,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-network/pulls/352"},"html":{"href":"https://github.com/yast/yast-network/pull/352"},"issue":{"href":"https://api.github.com/repos/yast/yast-network/issues/352"},"comments":{"href":"https://api.github.com/repos/yast/yast-network/issues/352/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-network/pulls/352/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/352/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-network/statuses/c0c1cdfc56e8bc5fc1964ee41cfc412ee8417e95"}}}}