Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Remove assertion in loading of dish file #28

@davidhuser

Description

@davidhuser

minor bug: Remove assertion statement:

... used assert to enforce interface constraints. However, assert is removed with compiling to optimised byte code (python -o producing *.pyo files). This caused various protections to be removed.

Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   Location: dhis2.py/dhis2/api.py:176
   More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
175	            password = section["password"]
176	            assert all([baseurl, username, password])
177	        except (KeyError, AssertionError):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions