{"action":"created","comment":{"url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments/52749423","id":52749423,"diff_hunk":"@@ -0,0 +1,207 @@\n+import json\r\n+import os\r\n+import subprocess\r\n+import time\r\n+import urllib2\r\n+import shutil\r\n+import sys\r\n+import logging\r\n+import crypt\r\n+import sys\r\n+\r\n+logging.basicConfig(filename='build.log', level=logging.INFO)\r\n+\r\n+\r\n+def system():\r\n+    return os.name\r\n+\r\n+\r\n+def Download(url, destination):\r\n+    file_name = destination.split('/')[-1]\r\n+    u = urllib2.urlopen(url)\r\n+    f = open(destination, 'wb')\r\n+    meta = u.info()\r\n+    file_size = int(meta.getheaders(\"Content-Length\")[0])\r\n+    print \"Downloading: %s Bytes: %s\" % (file_name, file_size)\r\n+\r\n+    file_size_dl = 0\r\n+    block_sz = 8192\r\n+    while True:\r\n+        buffer = u.read(block_sz)\r\n+        if not buffer:\r\n+            break\r\n+\r\n+        file_size_dl += len(buffer)\r\n+        f.write(buffer)\r\n+        status = r\"%10d  [%3.2f%%]\" % (file_size_dl, file_size_dl * 100. / file_size)\r\n+        status = status + chr(8) * (len(status) + 1)\r\n+        print status,\r\n+\r\n+    f.close()\r\n+\r\n+\r\n+def install_program(param_atempts, param_alowedExit, param_camand, param_cwd, param_env, param_retry_interval,\r\n+                    param_shell):\r\n+    logging.info(\"Try to install!: \" + param_camand)\r\n+    if param_atempts < 1:\r\n+        return -1\r\n+    os.chdir(param_cwd)\r\n+    fail = 1\r\n+    for i in xrange(param_atempts):\r\n+        compiler = list(param_camand.split(\" \")).__getitem__(0)\r\n+        installer = list(param_camand.split(\" \")).__getitem__(1)\r\n+        os.environ.copy()\r\n+        error = 0\r\n+        ret = subprocess.Popen([compiler, installer], env=param_env).wait()\r\n+        if isinstance(param_alowedExit, bool):\r\n+            if ret != 0:\r\n+                if param_alowedExit:\r\n+                    print \"Eroare grava!!!\"\r\n+                    error = 1\r\n+        elif isinstance(param_alowedExit, int):\r\n+            if not param_alowedExit == ret:\r\n+                print \"Eroare grava!!!\"\r","path":"final_assignment/Alexandru Tetelea/warhouse.py","position":63,"original_position":63,"commit_id":"1b895d85853f7a33bb1c0d971b253abffa53e473","original_commit_id":"1b895d85853f7a33bb1c0d971b253abffa53e473","user":{"login":"micumatei","id":4560298,"avatar_url":"https://avatars.githubusercontent.com/u/4560298?v=3","gravatar_id":"","url":"https://api.github.com/users/micumatei","html_url":"https://github.com/micumatei","followers_url":"https://api.github.com/users/micumatei/followers","following_url":"https://api.github.com/users/micumatei/following{/other_user}","gists_url":"https://api.github.com/users/micumatei/gists{/gist_id}","starred_url":"https://api.github.com/users/micumatei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micumatei/subscriptions","organizations_url":"https://api.github.com/users/micumatei/orgs","repos_url":"https://api.github.com/users/micumatei/repos","events_url":"https://api.github.com/users/micumatei/events{/privacy}","received_events_url":"https://api.github.com/users/micumatei/received_events","type":"User","site_admin":false},"body":"Dar nu imi dau seama care este eroarea .","created_at":"2016-02-12T14:49:17Z","updated_at":"2016-02-12T14:49:17Z","html_url":"https://github.com/alexandrucoman/python-lab/pull/90#discussion_r52749423","pull_request_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90","_links":{"self":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments/52749423"},"html":{"href":"https://github.com/alexandrucoman/python-lab/pull/90#discussion_r52749423"},"pull_request":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90"}}},"pull_request":{"url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90","id":59170082,"html_url":"https://github.com/alexandrucoman/python-lab/pull/90","diff_url":"https://github.com/alexandrucoman/python-lab/pull/90.diff","patch_url":"https://github.com/alexandrucoman/python-lab/pull/90.patch","issue_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/90","number":90,"state":"open","locked":false,"title":"Challenge","user":{"login":"lordusmd","id":3768592,"avatar_url":"https://avatars.githubusercontent.com/u/3768592?v=3","gravatar_id":"","url":"https://api.github.com/users/lordusmd","html_url":"https://github.com/lordusmd","followers_url":"https://api.github.com/users/lordusmd/followers","following_url":"https://api.github.com/users/lordusmd/following{/other_user}","gists_url":"https://api.github.com/users/lordusmd/gists{/gist_id}","starred_url":"https://api.github.com/users/lordusmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordusmd/subscriptions","organizations_url":"https://api.github.com/users/lordusmd/orgs","repos_url":"https://api.github.com/users/lordusmd/repos","events_url":"https://api.github.com/users/lordusmd/events{/privacy}","received_events_url":"https://api.github.com/users/lordusmd/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-12T12:59:38Z","updated_at":"2016-02-12T14:49:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ad0290b60f7e9e9446434cfa11957bf4e698aaf","assignee":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90/commits","review_comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90/comments","review_comment_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/90/comments","statuses_url":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/1b895d85853f7a33bb1c0d971b253abffa53e473","head":{"label":"lordusmd:Challenge","ref":"Challenge","sha":"1b895d85853f7a33bb1c0d971b253abffa53e473","user":{"login":"lordusmd","id":3768592,"avatar_url":"https://avatars.githubusercontent.com/u/3768592?v=3","gravatar_id":"","url":"https://api.github.com/users/lordusmd","html_url":"https://github.com/lordusmd","followers_url":"https://api.github.com/users/lordusmd/followers","following_url":"https://api.github.com/users/lordusmd/following{/other_user}","gists_url":"https://api.github.com/users/lordusmd/gists{/gist_id}","starred_url":"https://api.github.com/users/lordusmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordusmd/subscriptions","organizations_url":"https://api.github.com/users/lordusmd/orgs","repos_url":"https://api.github.com/users/lordusmd/repos","events_url":"https://api.github.com/users/lordusmd/events{/privacy}","received_events_url":"https://api.github.com/users/lordusmd/received_events","type":"User","site_admin":false},"repo":{"id":51076412,"name":"python-lab","full_name":"lordusmd/python-lab","owner":{"login":"lordusmd","id":3768592,"avatar_url":"https://avatars.githubusercontent.com/u/3768592?v=3","gravatar_id":"","url":"https://api.github.com/users/lordusmd","html_url":"https://github.com/lordusmd","followers_url":"https://api.github.com/users/lordusmd/followers","following_url":"https://api.github.com/users/lordusmd/following{/other_user}","gists_url":"https://api.github.com/users/lordusmd/gists{/gist_id}","starred_url":"https://api.github.com/users/lordusmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordusmd/subscriptions","organizations_url":"https://api.github.com/users/lordusmd/orgs","repos_url":"https://api.github.com/users/lordusmd/repos","events_url":"https://api.github.com/users/lordusmd/events{/privacy}","received_events_url":"https://api.github.com/users/lordusmd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lordusmd/python-lab","description":"","fork":true,"url":"https://api.github.com/repos/lordusmd/python-lab","forks_url":"https://api.github.com/repos/lordusmd/python-lab/forks","keys_url":"https://api.github.com/repos/lordusmd/python-lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lordusmd/python-lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lordusmd/python-lab/teams","hooks_url":"https://api.github.com/repos/lordusmd/python-lab/hooks","issue_events_url":"https://api.github.com/repos/lordusmd/python-lab/issues/events{/number}","events_url":"https://api.github.com/repos/lordusmd/python-lab/events","assignees_url":"https://api.github.com/repos/lordusmd/python-lab/assignees{/user}","branches_url":"https://api.github.com/repos/lordusmd/python-lab/branches{/branch}","tags_url":"https://api.github.com/repos/lordusmd/python-lab/tags","blobs_url":"https://api.github.com/repos/lordusmd/python-lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lordusmd/python-lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lordusmd/python-lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/lordusmd/python-lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lordusmd/python-lab/statuses/{sha}","languages_url":"https://api.github.com/repos/lordusmd/python-lab/languages","stargazers_url":"https://api.github.com/repos/lordusmd/python-lab/stargazers","contributors_url":"https://api.github.com/repos/lordusmd/python-lab/contributors","subscribers_url":"https://api.github.com/repos/lordusmd/python-lab/subscribers","subscription_url":"https://api.github.com/repos/lordusmd/python-lab/subscription","commits_url":"https://api.github.com/repos/lordusmd/python-lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/lordusmd/python-lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/lordusmd/python-lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/lordusmd/python-lab/issues/comments{/number}","contents_url":"https://api.github.com/repos/lordusmd/python-lab/contents/{+path}","compare_url":"https://api.github.com/repos/lordusmd/python-lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lordusmd/python-lab/merges","archive_url":"https://api.github.com/repos/lordusmd/python-lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lordusmd/python-lab/downloads","issues_url":"https://api.github.com/repos/lordusmd/python-lab/issues{/number}","pulls_url":"https://api.github.com/repos/lordusmd/python-lab/pulls{/number}","milestones_url":"https://api.github.com/repos/lordusmd/python-lab/milestones{/number}","notifications_url":"https://api.github.com/repos/lordusmd/python-lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lordusmd/python-lab/labels{/name}","releases_url":"https://api.github.com/repos/lordusmd/python-lab/releases{/id}","deployments_url":"https://api.github.com/repos/lordusmd/python-lab/deployments","created_at":"2016-02-04T13:06:05Z","updated_at":"2016-02-04T13:06:06Z","pushed_at":"2016-02-12T12:58:23Z","git_url":"git://github.com/lordusmd/python-lab.git","ssh_url":"git@github.com:lordusmd/python-lab.git","clone_url":"https://github.com/lordusmd/python-lab.git","svn_url":"https://github.com/lordusmd/python-lab","homepage":null,"size":477,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alexandrucoman:master","ref":"master","sha":"7d92683658686bd6eabedcdba74f3da4f28934f4","user":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"repo":{"id":42095096,"name":"python-lab","full_name":"alexandrucoman/python-lab","owner":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexandrucoman/python-lab","description":"","fork":false,"url":"https://api.github.com/repos/alexandrucoman/python-lab","forks_url":"https://api.github.com/repos/alexandrucoman/python-lab/forks","keys_url":"https://api.github.com/repos/alexandrucoman/python-lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexandrucoman/python-lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexandrucoman/python-lab/teams","hooks_url":"https://api.github.com/repos/alexandrucoman/python-lab/hooks","issue_events_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/events{/number}","events_url":"https://api.github.com/repos/alexandrucoman/python-lab/events","assignees_url":"https://api.github.com/repos/alexandrucoman/python-lab/assignees{/user}","branches_url":"https://api.github.com/repos/alexandrucoman/python-lab/branches{/branch}","tags_url":"https://api.github.com/repos/alexandrucoman/python-lab/tags","blobs_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/{sha}","languages_url":"https://api.github.com/repos/alexandrucoman/python-lab/languages","stargazers_url":"https://api.github.com/repos/alexandrucoman/python-lab/stargazers","contributors_url":"https://api.github.com/repos/alexandrucoman/python-lab/contributors","subscribers_url":"https://api.github.com/repos/alexandrucoman/python-lab/subscribers","subscription_url":"https://api.github.com/repos/alexandrucoman/python-lab/subscription","commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexandrucoman/python-lab/contents/{+path}","compare_url":"https://api.github.com/repos/alexandrucoman/python-lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexandrucoman/python-lab/merges","archive_url":"https://api.github.com/repos/alexandrucoman/python-lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexandrucoman/python-lab/downloads","issues_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues{/number}","pulls_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls{/number}","milestones_url":"https://api.github.com/repos/alexandrucoman/python-lab/milestones{/number}","notifications_url":"https://api.github.com/repos/alexandrucoman/python-lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexandrucoman/python-lab/labels{/name}","releases_url":"https://api.github.com/repos/alexandrucoman/python-lab/releases{/id}","deployments_url":"https://api.github.com/repos/alexandrucoman/python-lab/deployments","created_at":"2015-09-08T06:49:55Z","updated_at":"2016-02-11T21:04:45Z","pushed_at":"2016-02-12T14:22:53Z","git_url":"git://github.com/alexandrucoman/python-lab.git","ssh_url":"git@github.com:alexandrucoman/python-lab.git","clone_url":"https://github.com/alexandrucoman/python-lab.git","svn_url":"https://github.com/alexandrucoman/python-lab","homepage":null,"size":619,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":23,"forks":15,"open_issues":23,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90"},"html":{"href":"https://github.com/alexandrucoman/python-lab/pull/90"},"issue":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/issues/90"},"comments":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/1b895d85853f7a33bb1c0d971b253abffa53e473"}}}}