We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👀 Some source code analysis tools can help to find opportunities for improving software components. 💭 I propose to increase the usage of augmented assignment statements accordingly.
diff --git a/ui/opensnitch/database.py b/ui/opensnitch/database.py index c4467fe..294b157 100644 --- a/ui/opensnitch/database.py +++ b/ui/opensnitch/database.py @@ -327,7 +327,7 @@ class Database: def delete_rule(self, name, node_addr): qstr = "DELETE FROM rules WHERE name=?" if node_addr != None: - qstr = qstr + " AND node=?" + qstr += " AND node=?" with self._lock: q = QSqlQuery(qstr, self.db) @@ -345,7 +345,7 @@ class Database: """ qstr = "SELECT * from rules WHERE name=?" if node_addr != None: - qstr = qstr + " AND node=?" + qstr += " AND node=?" q = QSqlQuery(qstr, self.db) q.prepare(qstr) diff --git a/ui/opensnitch/dialogs/stats.py b/ui/opensnitch/dialogs/stats.py index 6db559b..3ea4620 100644 --- a/ui/opensnitch/dialogs/stats.py +++ b/ui/opensnitch/dialogs/stats.py @@ -1291,8 +1291,8 @@ class StatsDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]): if what == "": what = "WHERE" else: - what = what + " AND" - what = what + " r.name LIKE '%{0}%'".format(filter_text) + what += " AND" + what += " r.name LIKE '%{0}%'".format(filter_text) model = self._get_active_table().model() self.setQuery(model, "SELECT * FROM rules as r %s %s" % (what, self._get_order())) diff --git a/utils/legacy/make_ads_rules.py b/utils/legacy/make_ads_rules.py index 17ef929..8b86161 100644 --- a/utils/legacy/make_ads_rules.py +++ b/utils/legacy/make_ads_rules.py @@ -66,4 +66,4 @@ for domain, _ in domains.iteritems(): data = tpl % ( now, now, idx, domain ) fp.write(data) - idx = idx + 1 + idx += 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
👀 Some source code analysis tools can help to find opportunities for improving software components.
💭 I propose to increase the usage of augmented assignment statements accordingly.
The text was updated successfully, but these errors were encountered: