Skip to content

[CRASH CONDITION] - Guard self.unit against None #646

@VbhvGupta

Description

@VbhvGupta

self.unit[:-1] if self.interval == 1 else self.unit,

  • If self.interval == 1 is True, and, self.unit is None (which is what its being initialized to here) :

    self.unit: Optional[str] = None

    It results in crash.

  • The code should guard against self.unit being None before attempting self.unit[:-1]

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