{"action":"closed","number":7,"pull_request":{"url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7","id":106390038,"html_url":"https://github.com/cul-it/hfs2dfxmlpy2/pull/7","diff_url":"https://github.com/cul-it/hfs2dfxmlpy2/pull/7.diff","patch_url":"https://github.com/cul-it/hfs2dfxmlpy2/pull/7.patch","issue_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/7","number":7,"state":"closed","locked":false,"title":"Allow running from any directory","user":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars0.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"body":"When modifying the sys.path, include the full path so that this script will run in any directory.\r\n\r\nAnother, more Pythonic, solution is to fix dfxml to import like a python package by adding `__init__.py` to `dfxml` and `dfxml/python`, and modifying the import statement, but that requires changing multiple packages.\r\n\r\n```diff\r\n # Import Python DFXML Bindings\r\n-sys.path.append('dfxml/python')\r\n-import Objects as DFXML\r\n+from dfxml.python import Objects as DFXML\r\n```\r\n\r\nThese solutions should be verified with Python3 as well, since the relative/absolute import behaviour changed in python 2 vs python 3.","created_at":"2017-02-15T20:14:10Z","updated_at":"2017-04-04T19:53:53Z","closed_at":"2017-04-04T19:53:53Z","merged_at":null,"merge_commit_sha":"358cb71a13f03d0cb10a0d2d33e4fa0858ee6011","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7/commits","review_comments_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7/comments","review_comment_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/7/comments","statuses_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/statuses/396ce647239ad3b86644d5e1b7f255546de5b727","head":{"label":"Hwesta:patch-1","ref":"patch-1","sha":"396ce647239ad3b86644d5e1b7f255546de5b727","user":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars0.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"repo":{"id":82100928,"name":"hfs2dfxml","full_name":"Hwesta/hfs2dfxml","owner":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars0.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hwesta/hfs2dfxml","description":null,"fork":true,"url":"https://api.github.com/repos/Hwesta/hfs2dfxml","forks_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/forks","keys_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/teams","hooks_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/hooks","issue_events_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/issues/events{/number}","events_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/events","assignees_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/assignees{/user}","branches_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/branches{/branch}","tags_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/tags","blobs_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/statuses/{sha}","languages_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/languages","stargazers_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/stargazers","contributors_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/contributors","subscribers_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/subscribers","subscription_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/subscription","commits_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/contents/{+path}","compare_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/merges","archive_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/downloads","issues_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/issues{/number}","pulls_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/pulls{/number}","milestones_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/milestones{/number}","notifications_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/labels{/name}","releases_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/releases{/id}","deployments_url":"https://api.github.com/repos/Hwesta/hfs2dfxml/deployments","created_at":"2017-02-15T19:59:54Z","updated_at":"2017-02-15T19:59:55Z","pushed_at":"2017-02-15T20:11:42Z","git_url":"git://github.com/Hwesta/hfs2dfxml.git","ssh_url":"git@github.com:Hwesta/hfs2dfxml.git","clone_url":"https://github.com/Hwesta/hfs2dfxml.git","svn_url":"https://github.com/Hwesta/hfs2dfxml","homepage":null,"size":21,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"cul-it:master","ref":"master","sha":"0b769ec96fb8e23074fe6cb6d29076da1ff2ff14","user":{"login":"cul-it","id":7604148,"avatar_url":"https://avatars1.githubusercontent.com/u/7604148?v=3","gravatar_id":"","url":"https://api.github.com/users/cul-it","html_url":"https://github.com/cul-it","followers_url":"https://api.github.com/users/cul-it/followers","following_url":"https://api.github.com/users/cul-it/following{/other_user}","gists_url":"https://api.github.com/users/cul-it/gists{/gist_id}","starred_url":"https://api.github.com/users/cul-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cul-it/subscriptions","organizations_url":"https://api.github.com/users/cul-it/orgs","repos_url":"https://api.github.com/users/cul-it/repos","events_url":"https://api.github.com/users/cul-it/events{/privacy}","received_events_url":"https://api.github.com/users/cul-it/received_events","type":"Organization","site_admin":false},"repo":{"id":42608424,"name":"hfs2dfxmlpy2","full_name":"cul-it/hfs2dfxmlpy2","owner":{"login":"cul-it","id":7604148,"avatar_url":"https://avatars1.githubusercontent.com/u/7604148?v=3","gravatar_id":"","url":"https://api.github.com/users/cul-it","html_url":"https://github.com/cul-it","followers_url":"https://api.github.com/users/cul-it/followers","following_url":"https://api.github.com/users/cul-it/following{/other_user}","gists_url":"https://api.github.com/users/cul-it/gists{/gist_id}","starred_url":"https://api.github.com/users/cul-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cul-it/subscriptions","organizations_url":"https://api.github.com/users/cul-it/orgs","repos_url":"https://api.github.com/users/cul-it/repos","events_url":"https://api.github.com/users/cul-it/events{/privacy}","received_events_url":"https://api.github.com/users/cul-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cul-it/hfs2dfxmlpy2","description":null,"fork":false,"url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2","forks_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/forks","keys_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/teams","hooks_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/hooks","issue_events_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/events{/number}","events_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/events","assignees_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/assignees{/user}","branches_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/branches{/branch}","tags_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/tags","blobs_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/git/refs{/sha}","trees_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/statuses/{sha}","languages_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/languages","stargazers_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/stargazers","contributors_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/contributors","subscribers_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/subscribers","subscription_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/subscription","commits_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/commits{/sha}","git_commits_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/git/commits{/sha}","comments_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/comments{/number}","issue_comment_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/comments{/number}","contents_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/contents/{+path}","compare_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/merges","archive_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/downloads","issues_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues{/number}","pulls_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls{/number}","milestones_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/milestones{/number}","notifications_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/labels{/name}","releases_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/releases{/id}","deployments_url":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/deployments","created_at":"2015-09-16T19:23:31Z","updated_at":"2017-04-04T18:16:07Z","pushed_at":"2017-04-04T18:47:45Z","git_url":"git://github.com/cul-it/hfs2dfxmlpy2.git","ssh_url":"git@github.com:cul-it/hfs2dfxmlpy2.git","clone_url":"https://github.com/cul-it/hfs2dfxmlpy2.git","svn_url":"https://github.com/cul-it/hfs2dfxmlpy2","homepage":null,"size":21,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7"},"html":{"href":"https://github.com/cul-it/hfs2dfxmlpy2/pull/7"},"issue":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/7"},"comments":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/cul-it/hfs2dfxmlpy2/statuses/396ce647239ad3b86644d5e1b7f255546de5b727"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":1,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"dd388"}}