瀏覽代碼

Remove ugly non pythonic code

oz123 10 年之前
父節點
當前提交
47b58ba6da
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pwman/data/drivers/sqlite.py

+ 1 - 1
pwman/data/drivers/sqlite.py

@@ -192,7 +192,7 @@ class SQLiteDatabaseNewForm(Database):
     def listnodes(self):
         sql = ''
         params = []
-        if len(self._filtertags) == 0:
+        if not self._filtertags:
             sql = "SELECT ID FROM NODES ORDER BY ID ASC"
         else:
             first = True