Skip to content

Infinite Loop in the _read_init_initialization_line function #69

Description

@MHC03

When trying to Debug the Issue #66, my initial problem was, that I was stuck in an infinite Loop. This mainly was caused by having no specific setting for the tcsh Shell. But nevertheless the function _read_init_initialization_line does not catch one specific case where line may be False, that means that it may contain nothing. This case may not ever occur on a normal shell configuration, but it still should be catched:

def _read_int_initialization_line(output_file):
    while True:
        line = output_file.readline().strip()
        if line:  # <------------------------- line may be empty
            try:
                return int(line)
            except ValueError:
                raise CommandInitializationError(line)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions