mac-alias 2.0.4__tar.gz → 2.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: mac_alias
3
- Version: 2.0.4
3
+ Version: 2.0.6
4
4
  Summary: Generate/parse Mac OS Alias records from Python
5
5
  Home-page: http://alastairs-place.net/projects/mac_alias
6
6
  Author: Alastair Houghton
@@ -317,6 +317,9 @@ class Bookmark (object):
317
317
  if len(data) < 16:
318
318
  raise ValueError('Not a bookmark file (too short)')
319
319
 
320
+ if isinstance(data, bytearray):
321
+ data = bytes(data)
322
+
320
323
  magic,size,dummy,hdrsize = struct.unpack(b'<4sIII', data[0:16])
321
324
 
322
325
  if magic != b'book':
@@ -508,7 +511,7 @@ class Bookmark (object):
508
511
  # binary search to find data
509
512
  entries.sort()
510
513
 
511
- tocs.append((tid, b''.join([struct.pack('<III',k,o,0)
514
+ tocs.append((tid, b''.join([struct.pack(b'<III',k,o,0)
512
515
  for k,o in entries])))
513
516
 
514
517
  first_toc_offset = offset
@@ -595,9 +598,6 @@ class Bookmark (object):
595
598
 
596
599
  foldername = os.path.basename(dirname)
597
600
 
598
- print(repr(path))
599
- print(repr(vol_path))
600
-
601
601
  rel_path = os.path.relpath(path, vol_path)
602
602
 
603
603
  # Build the path arrays
@@ -624,12 +624,6 @@ class Bookmark (object):
624
624
  volprops = Data(struct.pack(b'<QQQ', 0x81 | kCFURLVolumeSupportsPersistentIDs,
625
625
  0x13ef | kCFURLVolumeSupportsPersistentIDs, 0))
626
626
 
627
- print(repr(name_path))
628
- print(repr(cnid_path))
629
- print(repr(fileprops))
630
- print(repr(vol_path))
631
- print(repr(vol_name))
632
-
633
627
  toc = {
634
628
  kBookmarkPath: name_path,
635
629
  kBookmarkCNIDPath: cnid_path,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: mac-alias
3
- Version: 2.0.4
3
+ Version: 2.0.6
4
4
  Summary: Generate/parse Mac OS Alias records from Python
5
5
  Home-page: http://alastairs-place.net/projects/mac_alias
6
6
  Author: Alastair Houghton
@@ -19,7 +19,7 @@ with open('README.rst', 'rb') as f:
19
19
  longdesc = f.read().decode('utf-8')
20
20
 
21
21
  setup(name='mac_alias',
22
- version='2.0.4',
22
+ version='2.0.6',
23
23
  description='Generate/parse Mac OS Alias records from Python',
24
24
  long_description=longdesc,
25
25
  author='Alastair Houghton',
File without changes
File without changes
File without changes
File without changes
File without changes