{"action":"created","comment":{"url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/comments/34650085","id":34650085,"diff_hunk":"@@ -169,10 +174,14 @@ def post(self):\n         used_by = getattr(self.module, 'used_by', None)\n         if used_by is not None:\n             self.set_status(400)\n-            return {'error': \"Module is used by {0}. If you need this module, \"\n+            self.write({'error': \"Module is used by {0}. If you need this module, \"\n                              \"you might force unlock it by issuing DELETE \"\n-                             \"request first.\".format(used_by)}\n+                             \"request first.\".format(used_by)})\n+            return\n         setattr(self.module, 'used_by', auth.user_by_token(self.api_token))\n+        global ws\n+        #Send update to all clients via WS\n+        ws.update_lock(hwconf.modules.index(self.module), getattr(self.module, 'used_by', None))","path":"easy_phi/app.py","position":41,"original_position":41,"commit_id":"bc36af39bc7453dc824476ae716b021e2f02fca5","original_commit_id":"bc36af39bc7453dc824476ae716b021e2f02fca5","user":{"login":"user2589","id":707904,"avatar_url":"https://avatars.githubusercontent.com/u/707904?v=3","gravatar_id":"","url":"https://api.github.com/users/user2589","html_url":"https://github.com/user2589","followers_url":"https://api.github.com/users/user2589/followers","following_url":"https://api.github.com/users/user2589/following{/other_user}","gists_url":"https://api.github.com/users/user2589/gists{/gist_id}","starred_url":"https://api.github.com/users/user2589/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user2589/subscriptions","organizations_url":"https://api.github.com/users/user2589/orgs","repos_url":"https://api.github.com/users/user2589/repos","events_url":"https://api.github.com/users/user2589/events{/privacy}","received_events_url":"https://api.github.com/users/user2589/received_events","type":"User","site_admin":false},"body":"ModuleHandler has attribute `slot`\r\nmay be we should define used_by in abstract module class to get rid of all these getattr/setattr, as lock concept became a thing already","created_at":"2015-07-15T06:49:34Z","updated_at":"2015-07-15T06:49:34Z","html_url":"https://github.com/QuantumCMU/easy_phi_API/pull/28#discussion_r34650085","pull_request_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/comments/34650085"},"html":{"href":"https://github.com/QuantumCMU/easy_phi_API/pull/28#discussion_r34650085"},"pull_request":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28","id":39896301,"html_url":"https://github.com/QuantumCMU/easy_phi_API/pull/28","diff_url":"https://github.com/QuantumCMU/easy_phi_API/pull/28.diff","patch_url":"https://github.com/QuantumCMU/easy_phi_API/pull/28.patch","issue_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/28","number":28,"state":"open","locked":false,"title":"Alexey 99 websockets","user":{"login":"rezniknn","id":6583079,"avatar_url":"https://avatars.githubusercontent.com/u/6583079?v=3","gravatar_id":"","url":"https://api.github.com/users/rezniknn","html_url":"https://github.com/rezniknn","followers_url":"https://api.github.com/users/rezniknn/followers","following_url":"https://api.github.com/users/rezniknn/following{/other_user}","gists_url":"https://api.github.com/users/rezniknn/gists{/gist_id}","starred_url":"https://api.github.com/users/rezniknn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rezniknn/subscriptions","organizations_url":"https://api.github.com/users/rezniknn/orgs","repos_url":"https://api.github.com/users/rezniknn/repos","events_url":"https://api.github.com/users/rezniknn/events{/privacy}","received_events_url":"https://api.github.com/users/rezniknn/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-14T09:16:18Z","updated_at":"2015-07-15T06:49:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f67d7ce0641d042e3a7819e272848c480f274c64","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28/commits","review_comments_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28/comments","review_comment_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/28/comments","statuses_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/statuses/bc36af39bc7453dc824476ae716b021e2f02fca5","head":{"label":"QuantumCMU:alexey_99_websockets","ref":"alexey_99_websockets","sha":"bc36af39bc7453dc824476ae716b021e2f02fca5","user":{"login":"QuantumCMU","id":12639606,"avatar_url":"https://avatars.githubusercontent.com/u/12639606?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumCMU","html_url":"https://github.com/QuantumCMU","followers_url":"https://api.github.com/users/QuantumCMU/followers","following_url":"https://api.github.com/users/QuantumCMU/following{/other_user}","gists_url":"https://api.github.com/users/QuantumCMU/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumCMU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumCMU/subscriptions","organizations_url":"https://api.github.com/users/QuantumCMU/orgs","repos_url":"https://api.github.com/users/QuantumCMU/repos","events_url":"https://api.github.com/users/QuantumCMU/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumCMU/received_events","type":"Organization","site_admin":false},"repo":{"id":36424169,"name":"easy_phi_API","full_name":"QuantumCMU/easy_phi_API","owner":{"login":"QuantumCMU","id":12639606,"avatar_url":"https://avatars.githubusercontent.com/u/12639606?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumCMU","html_url":"https://github.com/QuantumCMU","followers_url":"https://api.github.com/users/QuantumCMU/followers","following_url":"https://api.github.com/users/QuantumCMU/following{/other_user}","gists_url":"https://api.github.com/users/QuantumCMU/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumCMU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumCMU/subscriptions","organizations_url":"https://api.github.com/users/QuantumCMU/orgs","repos_url":"https://api.github.com/users/QuantumCMU/repos","events_url":"https://api.github.com/users/QuantumCMU/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumCMU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantumCMU/easy_phi_API","description":"Easy Phi project Python web application. It provides REST API to access test measurement equipment and provides basic web functions such as configuration wizards and UI themes support","fork":false,"url":"https://api.github.com/repos/QuantumCMU/easy_phi_API","forks_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/forks","keys_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/teams","hooks_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/hooks","issue_events_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/events{/number}","events_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/events","assignees_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/assignees{/user}","branches_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/branches{/branch}","tags_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/tags","blobs_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/languages","stargazers_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/stargazers","contributors_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/contributors","subscribers_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/subscribers","subscription_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/subscription","commits_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/contents/{+path}","compare_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/merges","archive_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/downloads","issues_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues{/number}","pulls_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/labels{/name}","releases_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/releases{/id}","created_at":"2015-05-28T08:11:43Z","updated_at":"2015-06-24T10:55:16Z","pushed_at":"2015-07-14T11:21:54Z","git_url":"git://github.com/QuantumCMU/easy_phi_API.git","ssh_url":"git@github.com:QuantumCMU/easy_phi_API.git","clone_url":"https://github.com/QuantumCMU/easy_phi_API.git","svn_url":"https://github.com/QuantumCMU/easy_phi_API","homepage":null,"size":2032,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"QuantumCMU:dev","ref":"dev","sha":"5203207e9d0f0cef0344b77710e6e7cdda1c3b06","user":{"login":"QuantumCMU","id":12639606,"avatar_url":"https://avatars.githubusercontent.com/u/12639606?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumCMU","html_url":"https://github.com/QuantumCMU","followers_url":"https://api.github.com/users/QuantumCMU/followers","following_url":"https://api.github.com/users/QuantumCMU/following{/other_user}","gists_url":"https://api.github.com/users/QuantumCMU/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumCMU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumCMU/subscriptions","organizations_url":"https://api.github.com/users/QuantumCMU/orgs","repos_url":"https://api.github.com/users/QuantumCMU/repos","events_url":"https://api.github.com/users/QuantumCMU/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumCMU/received_events","type":"Organization","site_admin":false},"repo":{"id":36424169,"name":"easy_phi_API","full_name":"QuantumCMU/easy_phi_API","owner":{"login":"QuantumCMU","id":12639606,"avatar_url":"https://avatars.githubusercontent.com/u/12639606?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumCMU","html_url":"https://github.com/QuantumCMU","followers_url":"https://api.github.com/users/QuantumCMU/followers","following_url":"https://api.github.com/users/QuantumCMU/following{/other_user}","gists_url":"https://api.github.com/users/QuantumCMU/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumCMU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumCMU/subscriptions","organizations_url":"https://api.github.com/users/QuantumCMU/orgs","repos_url":"https://api.github.com/users/QuantumCMU/repos","events_url":"https://api.github.com/users/QuantumCMU/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumCMU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantumCMU/easy_phi_API","description":"Easy Phi project Python web application. It provides REST API to access test measurement equipment and provides basic web functions such as configuration wizards and UI themes support","fork":false,"url":"https://api.github.com/repos/QuantumCMU/easy_phi_API","forks_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/forks","keys_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/teams","hooks_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/hooks","issue_events_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/events{/number}","events_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/events","assignees_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/assignees{/user}","branches_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/branches{/branch}","tags_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/tags","blobs_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/languages","stargazers_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/stargazers","contributors_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/contributors","subscribers_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/subscribers","subscription_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/subscription","commits_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/contents/{+path}","compare_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/merges","archive_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/downloads","issues_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues{/number}","pulls_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/labels{/name}","releases_url":"https://api.github.com/repos/QuantumCMU/easy_phi_API/releases{/id}","created_at":"2015-05-28T08:11:43Z","updated_at":"2015-06-24T10:55:16Z","pushed_at":"2015-07-14T11:21:54Z","git_url":"git://github.com/QuantumCMU/easy_phi_API.git","ssh_url":"git@github.com:QuantumCMU/easy_phi_API.git","clone_url":"https://github.com/QuantumCMU/easy_phi_API.git","svn_url":"https://github.com/QuantumCMU/easy_phi_API","homepage":null,"size":2032,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28"},"html":{"href":"https://github.com/QuantumCMU/easy_phi_API/pull/28"},"issue":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/28"},"comments":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/QuantumCMU/easy_phi_API/statuses/bc36af39bc7453dc824476ae716b021e2f02fca5"}}}}