Commit 0e7870ea authored by Alvin Noe Ladines's avatar Alvin Noe Ladines Committed by Markus Scheidgen
Browse files

Fixed issue #484

parent 862790ae
Subproject commit 0b328877ed067154661276da6251a501aaca8d57
Subproject commit 6c8d32cd0107b0cfda9890c82240d5309c568e1f
Subproject commit 7ad1a65e1ccd0f413f6b822ffd263854272db7e5
Subproject commit 7160799b23d96a7557584f319822227548d4dd1d
Subproject commit 2247da576335a97e776ae58091d82774f5122525
Subproject commit 076cff5b53332309fbd35a5febf2c748cf611519
Subproject commit c09f64143b6df098bd06882465fb9e4d29c44578
Subproject commit edec79dae93b1730d77205168c02aaaa5683ea13
......@@ -73,6 +73,9 @@ class FileParser:
results default will be returned. A pint unit can be provided which is attached
to the returned value.
'''
if self.mainfile is None:
return default
self._key = key
self._kwargs = kwargs
val = self.results.get(key, None)
......
......@@ -103,7 +103,7 @@ class Quantity:
self.shape = None
elif isinstance(quantity, mQuantity):
self.name = quantity.name
self.dtype = quantity.type
self.dtype = quantity.type.type if isinstance(quantity.type, np.dtype) else quantity.type
self.unit = quantity.unit
# check if metainfo shape has dependencies
self.shape = quantity.shape
......@@ -425,6 +425,7 @@ class TextParser(FileParser):
span = np.array(res.span()) + self.file_offset
sub_parser = quantity._sub_parser.copy()
sub_parser.mainfile = self.mainfile
sub_parser.logger = self.logger
if (span[1] - span[0]) < mmap.PAGESIZE or True:
# self.logger.warn(
# 'Cannot use sub parser on quantity %s with blocks with size <'
......@@ -447,6 +448,7 @@ class TextParser(FileParser):
span = np.array(res.span()) + self.file_offset
sub_parser = quantity._sub_parser.copy()
sub_parser.mainfile = self.mainfile
sub_parser.logger = self.logger
if (span[1] - span[0]) < mmap.PAGESIZE or True:
# self.logger.warn(
# 'Cannot use sub parser on quantity %s with blocks with size <'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment