parse comment
var 'rows' not init before return
This commit is contained in:
parent
03b1a53b9a
commit
d968f01245
2 changed files with 3 additions and 1 deletions
|
@ -550,8 +550,8 @@ class Dbv3Transfer(DbTransfer):
|
|||
|
||||
cur = conn.cursor()
|
||||
try:
|
||||
cur.execute("SELECT " + ','.join(keys) + " FROM user")
|
||||
rows = []
|
||||
cur.execute("SELECT " + ','.join(keys) + " FROM user")
|
||||
for r in cur.fetchall():
|
||||
d = {}
|
||||
for column in range(len(keys)):
|
||||
|
|
|
@ -331,6 +331,8 @@ class DNSResolver(object):
|
|||
with open(etc_path, 'rb') as f:
|
||||
for line in f.readlines():
|
||||
line = line.strip()
|
||||
if "#" in line:
|
||||
line = line[:line.find('#')]
|
||||
parts = line.split()
|
||||
if len(parts) >= 2:
|
||||
ip = parts[0]
|
||||
|
|
Loading…
Add table
Reference in a new issue