Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

remove error prone total_changes function introduced in #158 #163

Closed
wants to merge 5 commits into from
Closed

remove error prone total_changes function introduced in #158 #163

wants to merge 5 commits into from

Conversation

mwoolweaver
Copy link
Contributor

@mwoolweaver mwoolweaver commented Sep 1, 2020

https://github.com/anudeepND/whitelist/pull/158/files/e58bf0e986d6d1942b40c33f1458619c2941ac1a#diff-ae558a92912d7c9374a906e64b4b158eR133

and

https://github.com/anudeepND/whitelist/pull/158/files/e58bf0e986d6d1942b40c33f1458619c2941ac1a#diff-6fea026f04d10fad806b3d3b71d7747aR129

IMO your only adding or removing and URL from the whitelist WHERE type = 0 AND comment LIKE '%qjz9zk%' so that's all we should check for.

Also worth noting is the number you're wanting to get back from total_changes is the same as the number of domains added OR removed by the respective scripts.

 # find only the domains we added
        number_domains = cursor.execute(" SELECT * FROM domainlist WHERE type = 0 AND comment LIKE '%qjz9zk%' ")

        numberDomains = len(number_domains.fetchall())

new version can be tested from here

https://github.com/mwoolweaver/whitelist/tree/devel

wget https://raw.githubusercontent.com/mwoolweaver/whitelist/devel/scripts/whitelist.py

@mwoolweaver mwoolweaver closed this Sep 1, 2020
@mwoolweaver
Copy link
Contributor Author

mwoolweaver commented Sep 1, 2020

development branch does not appear up-to-date with master so re-opening

@mwoolweaver mwoolweaver reopened this Sep 1, 2020
@anudeepND
Copy link
Owner

@mwoolweaver Thanks for the information.

IMO your only adding or removing and URL from the whitelist WHERE type = 0 AND comment LIKE '%qjz9zk%' so that's all we should check for.

I think it is better to get all the domain in the whitelist, including both regex and normal domains. I merged a previously opened PR so there's a merge conflict, can you fix it?

@mwoolweaver
Copy link
Contributor Author

@anudeepND see #164 for update. also accomplished in less commits

@mwoolweaver mwoolweaver closed this Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants