{"action":"created","comment":{"url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/48142401","id":48142401,"diff_hunk":"@@ -1049,30 +1050,39 @@ def finish_reingest(self, origin_location, origin_path, reingest_location, reing\n \n         # Compress\n         # TODO update this for uncompressed AIPs\n-        reingest_root = etree.parse(reingest_pointer)\n-        os.remove(reingest_pointer)\n-        puid = reingest_root.findtext('.//premis:formatRegistryKey', namespaces=utils.NSMAP)\n-        if puid == 'fmt/484':  # 7 Zip\n-            algo = reingest_root.find('.//mets:transformFile', namespaces=utils.NSMAP).get('TRANSFORMALGORITHM')\n-            if algo == 'bzip2':\n-                compression = self.COMPRESSION_7Z_BZIP\n-            elif algo == 'lzma':\n-                compression = self.COMPRESSION_7Z_LZMA\n+        if self.is_compressed:\n+            reingest_root = etree.parse(reingest_pointer)\n+            os.remove(reingest_pointer)\n+            puid = reingest_root.findtext('.//premis:formatRegistryKey', namespaces=utils.NSMAP)\n+            if puid == 'fmt/484':  # 7 Zip\n+                algo = reingest_root.find('.//mets:transformFile', namespaces=utils.NSMAP).get('TRANSFORMALGORITHM')\n+                if algo == 'bzip2':\n+                    compression = self.COMPRESSION_7Z_BZIP\n+                elif algo == 'lzma':\n+                    compression = self.COMPRESSION_7Z_LZMA\n+                else:\n+                    compression = self.COMPRESSION_7Z_BZIP\n+                    LOGGER.warning('Reingest: Unable to determine reingested compression algorithm, defaulting to bzip2.')\n+            elif puid == 'x-fmt/268':  # Bzipped (probably tar)\n+                compression = self.COMPRESSION_TAR_BZIP2\n             else:","path":"storage_service/locations/models/package.py","position":63,"original_position":63,"commit_id":"a515a85989424b2399b9c5eb3bf332b52d18953b","original_commit_id":"a515a85989424b2399b9c5eb3bf332b52d18953b","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":false},"body":"Oh, I see that's what the old code did.","created_at":"2015-12-21T12:47:20Z","updated_at":"2015-12-21T12:47:20Z","html_url":"https://github.com/artefactual/archivematica-storage-service/pull/98#discussion_r48142401","pull_request_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/48142401"},"html":{"href":"https://github.com/artefactual/archivematica-storage-service/pull/98#discussion_r48142401"},"pull_request":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98","id":52490310,"html_url":"https://github.com/artefactual/archivematica-storage-service/pull/98","diff_url":"https://github.com/artefactual/archivematica-storage-service/pull/98.diff","patch_url":"https://github.com/artefactual/archivematica-storage-service/pull/98.patch","issue_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/98","number":98,"state":"open","locked":false,"title":"Reingesting uncompressed AIPs fix. refs #8893","user":{"login":"mcantelon","id":49010,"avatar_url":"https://avatars.githubusercontent.com/u/49010?v=3","gravatar_id":"","url":"https://api.github.com/users/mcantelon","html_url":"https://github.com/mcantelon","followers_url":"https://api.github.com/users/mcantelon/followers","following_url":"https://api.github.com/users/mcantelon/following{/other_user}","gists_url":"https://api.github.com/users/mcantelon/gists{/gist_id}","starred_url":"https://api.github.com/users/mcantelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcantelon/subscriptions","organizations_url":"https://api.github.com/users/mcantelon/orgs","repos_url":"https://api.github.com/users/mcantelon/repos","events_url":"https://api.github.com/users/mcantelon/events{/privacy}","received_events_url":"https://api.github.com/users/mcantelon/received_events","type":"User","site_admin":false},"body":"Fixed issues with reingestion of uncompressed AIPs.","created_at":"2015-12-03T04:19:14Z","updated_at":"2015-12-21T12:47:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45dd0fee89c230c24c0895a9ce68009a316b8c78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98/commits","review_comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98/comments","review_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/98/comments","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/a515a85989424b2399b9c5eb3bf332b52d18953b","head":{"label":"artefactual:dev/issue-8893-uncompressed-aip-reingest","ref":"dev/issue-8893-uncompressed-aip-reingest","sha":"a515a85989424b2399b9c5eb3bf332b52d18953b","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":12164369,"name":"archivematica-storage-service","full_name":"artefactual/archivematica-storage-service","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica-storage-service","description":"Archivematica storage service","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica-storage-service","forks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/releases{/id}","created_at":"2013-08-16T17:41:44Z","updated_at":"2015-11-05T05:00:17Z","pushed_at":"2015-12-17T23:15:21Z","git_url":"git://github.com/artefactual/archivematica-storage-service.git","ssh_url":"git@github.com:artefactual/archivematica-storage-service.git","clone_url":"https://github.com/artefactual/archivematica-storage-service.git","svn_url":"https://github.com/artefactual/archivematica-storage-service","homepage":"http://www.archivematica.org","size":2679,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":8,"default_branch":"stable/0.7.x"}},"base":{"label":"artefactual:qa/0.x","ref":"qa/0.x","sha":"4e8e5edcabc6a367928962895a46193b9eeda862","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":12164369,"name":"archivematica-storage-service","full_name":"artefactual/archivematica-storage-service","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica-storage-service","description":"Archivematica storage service","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica-storage-service","forks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/releases{/id}","created_at":"2013-08-16T17:41:44Z","updated_at":"2015-11-05T05:00:17Z","pushed_at":"2015-12-17T23:15:21Z","git_url":"git://github.com/artefactual/archivematica-storage-service.git","ssh_url":"git@github.com:artefactual/archivematica-storage-service.git","clone_url":"https://github.com/artefactual/archivematica-storage-service.git","svn_url":"https://github.com/artefactual/archivematica-storage-service","homepage":"http://www.archivematica.org","size":2679,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":8,"default_branch":"stable/0.7.x"}},"_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98"},"html":{"href":"https://github.com/artefactual/archivematica-storage-service/pull/98"},"issue":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/98"},"comments":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/a515a85989424b2399b9c5eb3bf332b52d18953b"}}}}