Skip to content

Commit

Permalink
Kindlekey fix for complex mac disk setups.
Browse files Browse the repository at this point in the history
  • Loading branch information
apprenticeharper committed Jun 27, 2017
1 parent 2042354 commit a252dd0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
# 2.2 - Fixes for Macs with bonded ethernet ports
# Also removed old .kinfo file support (pre-2011)
# 2.3 - Added more field names thanks to concavegit's KFX code.
# 2.4 - Fix for complex Mac disk setups, thanks to Tibs


"""
Retrieve Kindle for PC/Mac user key.
"""

__license__ = 'GPL v3'
__version__ = '2.3'
__version__ = '2.4'

import sys, os, re
from struct import pack, unpack, unpack_from
Expand Down Expand Up @@ -1267,7 +1268,7 @@ def GetDiskPartitionNames():
for j in xrange(cnt):
resline = reslst[j]
if resline.startswith('/dev'):
(devpart, mpath) = resline.split(' on ')
(devpart, mpath) = resline.split(' on ')[:2]
dpart = devpart[5:]
names.append(dpart)
return names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
# 2.2 - Fixes for Macs with bonded ethernet ports
# Also removed old .kinfo file support (pre-2011)
# 2.3 - Added more field names thanks to concavegit's KFX code.
# 2.4 - Fix for complex Mac disk setups, thanks to Tibs


"""
Retrieve Kindle for PC/Mac user key.
"""

__license__ = 'GPL v3'
__version__ = '2.3'
__version__ = '2.4'

import sys, os, re
from struct import pack, unpack, unpack_from
Expand Down Expand Up @@ -1267,7 +1268,7 @@ def GetDiskPartitionNames():
for j in xrange(cnt):
resline = reslst[j]
if resline.startswith('/dev'):
(devpart, mpath) = resline.split(' on ')
(devpart, mpath) = resline.split(' on ')[:2]
dpart = devpart[5:]
names.append(dpart)
return names
Expand Down
Binary file modified DeDRM_calibre_plugin/DeDRM_plugin.zip
Binary file not shown.
5 changes: 3 additions & 2 deletions DeDRM_calibre_plugin/DeDRM_plugin/kindlekey.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
# 2.2 - Fixes for Macs with bonded ethernet ports
# Also removed old .kinfo file support (pre-2011)
# 2.3 - Added more field names thanks to concavegit's KFX code.
# 2.4 - Fix for complex Mac disk setups, thanks to Tibs


"""
Retrieve Kindle for PC/Mac user key.
"""

__license__ = 'GPL v3'
__version__ = '2.3'
__version__ = '2.4'

import sys, os, re
from struct import pack, unpack, unpack_from
Expand Down Expand Up @@ -1267,7 +1268,7 @@ def GetDiskPartitionNames():
for j in xrange(cnt):
resline = reslst[j]
if resline.startswith('/dev'):
(devpart, mpath) = resline.split(' on ')
(devpart, mpath) = resline.split(' on ')[:2]
dpart = devpart[5:]
names.append(dpart)
return names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ from __future__ import with_statement
# 2.2 - Fixes for Macs with bonded ethernet ports
# Also removed old .kinfo file support (pre-2011)
# 2.3 - Added more field names thanks to concavegit's KFX code.
# 2.4 - Fix for complex Mac disk setups, thanks to Tibs


"""
Retrieve Kindle for PC/Mac user key.
"""

__license__ = 'GPL v3'
__version__ = '2.3'
__version__ = '2.4'

import sys, os, re
from struct import pack, unpack, unpack_from
Expand Down Expand Up @@ -1267,7 +1268,7 @@ elif isosx:
for j in xrange(cnt):
resline = reslst[j]
if resline.startswith('/dev'):
(devpart, mpath) = resline.split(' on ')
(devpart, mpath) = resline.split(' on ')[:2]
dpart = devpart[5:]
names.append(dpart)
return names
Expand Down

0 comments on commit a252dd0

Please sign in to comment.