Fixes for the plugin and Android keys (help still needs adding)

This commit is contained in:
Apprentice Harper
2015-03-18 19:12:01 +00:00
committed by Apprentice Alf
parent 39c9d57b15
commit 6b2672ff7c
5 changed files with 43 additions and 30 deletions

View File

@@ -256,14 +256,14 @@ def get_serials(path=STORAGE):
tar = tarfile.open(fileobj=output)
for member in tar.getmembers():
if member.name.strip().endswith(STORAGE1):
write = tempfile.NamedTemporaryFile(mode='w', delete=False)
write = tempfile.NamedTemporaryFile(mode='wb', delete=False)
write.write(tar.extractfile(member).read())
write.close()
write_path = os.path.abspath(write.name)
serials.extend(get_serials1(write_path))
os.remove(write_path)
elif member.name.strip().endswith(STORAGE2):
write = tempfile.NamedTemporaryFile(mode='w', delete=False)
write = tempfile.NamedTemporaryFile(mode='wb', delete=False)
write.write(tar.extractfile(member).read())
write.close()
write_path = os.path.abspath(write.name)