appsembler / tahoe-sites

Tahoe multi-tenancy app for site separation models and helpers for the edx-platform.
MIT License
0 stars 0 forks source link

remove asserts from production code #40

Closed OmarIthawi closed 2 years ago

OmarIthawi commented 2 years ago

as per: https://github.com/appsembler/xblock-grade-fetcher/pull/8#discussion_r818666491

Beware that if you run python with the -O flag, it doesn't execute assert statements. I assume that edX doesn't use that flag, but especially since this is in a reusable module and there isn't any way to control what flags get used, it's risky to rely on assert to avoid bad data or enforce anything like a security constraint.