{"action":"created","comment":{"url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/comments/189758529","pull_request_review_id":121998918,"id":189758529,"diff_hunk":"@@ -53,6 +55,20 @@ def __init__(self):\n     def create_db(self):\n         try:\n             with self.connection:\n+                self.connection.execute(\n+                    '''\n+                    CREATE TABLE IF NOT EXISTS\n+                    audit(","path":"src/db_handling.py","position":null,"original_position":16,"commit_id":"32ec56e310d0a8ee58549f9267d274309071256f","original_commit_id":"91a3e6c017bc7aad88d2426dfe06f2e11644bc36","user":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"body":"Исправлено в 32ec56e310d0a8ee58549f9267d274309071256f","created_at":"2018-05-22T01:47:44Z","updated_at":"2018-05-22T01:47:44Z","html_url":"https://github.com/manmolecular/PT-homework/pull/2#discussion_r189758529","pull_request_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/comments/189758529"},"html":{"href":"https://github.com/manmolecular/PT-homework/pull/2#discussion_r189758529"},"pull_request":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2"}},"in_reply_to_id":189432190},"pull_request":{"url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2","id":188872736,"html_url":"https://github.com/manmolecular/PT-homework/pull/2","diff_url":"https://github.com/manmolecular/PT-homework/pull/2.diff","patch_url":"https://github.com/manmolecular/PT-homework/pull/2.patch","issue_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/2","number":2,"state":"open","locked":false,"title":"work on homework-4","user":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"body":"**Тестовый стенд:**\r\n- Хостовая система - Windows 10 Home (64-bit)\r\n- Гостевая система - [Windows 7 Enterprise (64-bit)](http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso) из репозитория с заданиями\r\n- [Docker Toolbox](https://docs.docker.com/toolbox/toolbox_install_windows/) на хосте\r\n\r\n**Среда разработки на хосте:**\r\n- [Python 3.6.5 (64-bit)](https://www.python.org/ftp/python/3.6.5/python-3.6.5-amd64.exe)\r\n- [Pycharm 2018.1.3](https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&code=PCC)\r\n- [GTK3 (64-bit)](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer) (weasyprint)\r\n- [Visual C++ Build Tools](https://landinghub.visualstudio.com/visual-cpp-build-tools) (weasyprint)\r\n\r\n**Общая схема системы:**\r\n- Windows 7 из _виртуальной машины_ подключена к виртуальному адаптеру VBox с адресом `192.168.99.100` (или `*.101`) (файл `config.json:15`)\r\n- На _хост-системе_ поднимается докер со всеми сервисами с помощью `docker-compose`, адрес сервисов `192.168.99.101` (или `*.100`) (файл `config.json:2`)\r\n- Скрипты обращаются к докеру за `SSH` и `SQL`, к гостевой виртуальной системе за `WMI` и `WMI registry`\r\n\r\n**В итоге:**\r\n```\r\nmain.py -> ( virtual box ) -> ( WMI + WMI reg ) -> Windows 7 \r\nmain.py -> ( docker ) -> ( SSH, SQL ) -> Ubuntu 16.04, MariaDB\r\n```\r\n\r\n**WMI - вывод результата exec в файл:**\r\n`wmi_exec` выполняет команду на удаленной машине через `cmd` и записывает результат в `C:\\Windows\\Temp` в формате `*.txt` файла. Имя файла выбирается на базе команды, за исключением знаков пунктуации и других.  \r\nНапример, команда `ping 0.0.0.0` -> `ping0000.txt`\r\n\r\n**Возможные неочевидные проблемы настройки под win:**\r\nПри установке пакетов из `requirements.txt` под windows 10 мне пришлось вручную установить `wheel` для `MarkupSafe`: [MarkupSafe-1.0-cp36-cp36m-win_amd64](https://www.lfd.uci.edu/~gohlke/pythonlibs/#markupsafe)\r\n\r\n**Текущие вопросы по функционированию кода:**\r\nIssue: https://github.com/manmolecular/PT-homework/issues/3\r\n\r\nНа данный момент отказался от модуля `winreg` в пользу использования констант - с ними всё функционирует как и должно, и условия задачи полностью покрывает.","created_at":"2018-05-17T21:59:17Z","updated_at":"2018-05-22T01:47:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"140428d0c86f1882639eaa52586edbef6d26773b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2/commits","review_comments_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2/comments","review_comment_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/2/comments","statuses_url":"https://api.github.com/repos/manmolecular/PT-homework/statuses/32ec56e310d0a8ee58549f9267d274309071256f","head":{"label":"manmolecular:windevelop","ref":"windevelop","sha":"32ec56e310d0a8ee58549f9267d274309071256f","user":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"repo":{"id":131478616,"name":"PT-homework","full_name":"manmolecular/PT-homework","owner":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manmolecular/PT-homework","description":"Homework based on PT python lectures","fork":false,"url":"https://api.github.com/repos/manmolecular/PT-homework","forks_url":"https://api.github.com/repos/manmolecular/PT-homework/forks","keys_url":"https://api.github.com/repos/manmolecular/PT-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manmolecular/PT-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manmolecular/PT-homework/teams","hooks_url":"https://api.github.com/repos/manmolecular/PT-homework/hooks","issue_events_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/events{/number}","events_url":"https://api.github.com/repos/manmolecular/PT-homework/events","assignees_url":"https://api.github.com/repos/manmolecular/PT-homework/assignees{/user}","branches_url":"https://api.github.com/repos/manmolecular/PT-homework/branches{/branch}","tags_url":"https://api.github.com/repos/manmolecular/PT-homework/tags","blobs_url":"https://api.github.com/repos/manmolecular/PT-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manmolecular/PT-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manmolecular/PT-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/manmolecular/PT-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manmolecular/PT-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/manmolecular/PT-homework/languages","stargazers_url":"https://api.github.com/repos/manmolecular/PT-homework/stargazers","contributors_url":"https://api.github.com/repos/manmolecular/PT-homework/contributors","subscribers_url":"https://api.github.com/repos/manmolecular/PT-homework/subscribers","subscription_url":"https://api.github.com/repos/manmolecular/PT-homework/subscription","commits_url":"https://api.github.com/repos/manmolecular/PT-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/manmolecular/PT-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/manmolecular/PT-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/manmolecular/PT-homework/contents/{+path}","compare_url":"https://api.github.com/repos/manmolecular/PT-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manmolecular/PT-homework/merges","archive_url":"https://api.github.com/repos/manmolecular/PT-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manmolecular/PT-homework/downloads","issues_url":"https://api.github.com/repos/manmolecular/PT-homework/issues{/number}","pulls_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/manmolecular/PT-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/manmolecular/PT-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manmolecular/PT-homework/labels{/name}","releases_url":"https://api.github.com/repos/manmolecular/PT-homework/releases{/id}","deployments_url":"https://api.github.com/repos/manmolecular/PT-homework/deployments","created_at":"2018-04-29T08:37:56Z","updated_at":"2018-05-14T16:54:01Z","pushed_at":"2018-05-22T01:47:24Z","git_url":"git://github.com/manmolecular/PT-homework.git","ssh_url":"git@github.com:manmolecular/PT-homework.git","clone_url":"https://github.com/manmolecular/PT-homework.git","svn_url":"https://github.com/manmolecular/PT-homework","homepage":null,"size":163,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"manmolecular:master","ref":"master","sha":"e86769afe4be82379e1ce070f7fd34f3a8b4b9eb","user":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"repo":{"id":131478616,"name":"PT-homework","full_name":"manmolecular/PT-homework","owner":{"login":"manmolecular","id":24269213,"avatar_url":"https://avatars1.githubusercontent.com/u/24269213?v=4","gravatar_id":"","url":"https://api.github.com/users/manmolecular","html_url":"https://github.com/manmolecular","followers_url":"https://api.github.com/users/manmolecular/followers","following_url":"https://api.github.com/users/manmolecular/following{/other_user}","gists_url":"https://api.github.com/users/manmolecular/gists{/gist_id}","starred_url":"https://api.github.com/users/manmolecular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manmolecular/subscriptions","organizations_url":"https://api.github.com/users/manmolecular/orgs","repos_url":"https://api.github.com/users/manmolecular/repos","events_url":"https://api.github.com/users/manmolecular/events{/privacy}","received_events_url":"https://api.github.com/users/manmolecular/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manmolecular/PT-homework","description":"Homework based on PT python lectures","fork":false,"url":"https://api.github.com/repos/manmolecular/PT-homework","forks_url":"https://api.github.com/repos/manmolecular/PT-homework/forks","keys_url":"https://api.github.com/repos/manmolecular/PT-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manmolecular/PT-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manmolecular/PT-homework/teams","hooks_url":"https://api.github.com/repos/manmolecular/PT-homework/hooks","issue_events_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/events{/number}","events_url":"https://api.github.com/repos/manmolecular/PT-homework/events","assignees_url":"https://api.github.com/repos/manmolecular/PT-homework/assignees{/user}","branches_url":"https://api.github.com/repos/manmolecular/PT-homework/branches{/branch}","tags_url":"https://api.github.com/repos/manmolecular/PT-homework/tags","blobs_url":"https://api.github.com/repos/manmolecular/PT-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manmolecular/PT-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manmolecular/PT-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/manmolecular/PT-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manmolecular/PT-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/manmolecular/PT-homework/languages","stargazers_url":"https://api.github.com/repos/manmolecular/PT-homework/stargazers","contributors_url":"https://api.github.com/repos/manmolecular/PT-homework/contributors","subscribers_url":"https://api.github.com/repos/manmolecular/PT-homework/subscribers","subscription_url":"https://api.github.com/repos/manmolecular/PT-homework/subscription","commits_url":"https://api.github.com/repos/manmolecular/PT-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/manmolecular/PT-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/manmolecular/PT-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/manmolecular/PT-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/manmolecular/PT-homework/contents/{+path}","compare_url":"https://api.github.com/repos/manmolecular/PT-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manmolecular/PT-homework/merges","archive_url":"https://api.github.com/repos/manmolecular/PT-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manmolecular/PT-homework/downloads","issues_url":"https://api.github.com/repos/manmolecular/PT-homework/issues{/number}","pulls_url":"https://api.github.com/repos/manmolecular/PT-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/manmolecular/PT-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/manmolecular/PT-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manmolecular/PT-homework/labels{/name}","releases_url":"https://api.github.com/repos/manmolecular/PT-homework/releases{/id}","deployments_url":"https://api.github.com/repos/manmolecular/PT-homework/deployments","created_at":"2018-04-29T08:37:56Z","updated_at":"2018-05-14T16:54:01Z","pushed_at":"2018-05-22T01:47:24Z","git_url":"git://github.com/manmolecular/PT-homework.git","ssh_url":"git@github.com:manmolecular/PT-homework.git","clone_url":"https://github.com/manmolecular/PT-homework.git","svn_url":"https://github.com/manmolecular/PT-homework","homepage":null,"size":163,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2"},"html":{"href":"https://github.com/manmolecular/PT-homework/pull/2"},"issue":{"href":"https://api.github.com/repos/manmolecular/PT-homework/issues/2"},"comments":{"href":"https://api.github.com/repos/manmolecular/PT-homework/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manmolecular/PT-homework/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/manmolecular/PT-homework/statuses/32ec56e310d0a8ee58549f9267d274309071256f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"manmolecular"}}