Changeset 1de11fa in ammosreader


Ignore:
Timestamp:
05/28/23 12:14:26 (2 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource
Children:
d6535bd
Parents:
1fb7060
Message:

check for None type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ammosreader/AmmosAudioReader.py

    r1fb7060 r1de11fa  
    6767        byte_string = self.source.read_bytes(total)
    6868
    69         if len(byte_string) != total:
     69        if ((not byte_string) or (len(byte_string) != total)):
    7070            logger.debug("Can not read all %s bytes of data body", total)
    7171            return None
Note: See TracChangeset for help on using the changeset viewer.