fix minor errors
This commit is contained in:
parent
06ce98d358
commit
3a75ad640d
|
@ -0,0 +1,2 @@
|
|||
[flake8]
|
||||
max-line-length = 100
|
|
@ -1,5 +1,5 @@
|
|||
import binascii
|
||||
from typing import TypeVar, List, Tuple, Optional
|
||||
from typing import Optional
|
||||
|
||||
from pyroute2 import IPRoute, WireGuard
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import binascii
|
||||
import ipaddress
|
||||
import secrets
|
||||
import sqlite3
|
||||
from typing import Iterable, List, NamedTuple, Optional, Set
|
||||
|
||||
|
@ -130,10 +129,9 @@ class Database:
|
|||
|
||||
def add_node_resource(self, id: int, resource: str) -> None:
|
||||
self.conn.execute("INSERT OR IGNORE INTO node_resources (node, resource) VALUES (?, ?)",
|
||||
(id, resource))
|
||||
(id, resource))
|
||||
self.conn.commit()
|
||||
|
||||
def remove_node_resource(self, id: int, resource: str) -> None:
|
||||
self.conn.execute("DELETE FROM node_resources WHERE node=? and resource=?",
|
||||
(id, resource))
|
||||
self.conn.execute("DELETE FROM node_resources WHERE node=? and resource=?", (id, resource))
|
||||
self.conn.commit()
|
||||
|
|
Loading…
Reference in New Issue