Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f2967a552 | ||
|
|
42d6c47edc | ||
|
|
223b172cc6 | ||
|
|
8c598d1cf2 |
@ -125,7 +125,7 @@ class DB_Mysql():
|
|||||||
|
|
||||||
shareid = self.dbc.fetchone()
|
shareid = self.dbc.fetchone()
|
||||||
|
|
||||||
if shareid[0] > 0:
|
if shareid and shareid[0] > 0:
|
||||||
# Note: difficulty = -1 here
|
# Note: difficulty = -1 here
|
||||||
self.execute(
|
self.execute(
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class DB_Mysql_Vardiff(DB_Mysql.DB_Mysql):
|
|||||||
|
|
||||||
shareid = self.dbc.fetchone()
|
shareid = self.dbc.fetchone()
|
||||||
|
|
||||||
if shareid[0] > 0:
|
if shareid and shareid[0] > 0:
|
||||||
# Note: difficulty = -1 here
|
# Note: difficulty = -1 here
|
||||||
self.execute(
|
self.execute(
|
||||||
"""
|
"""
|
||||||
@ -113,16 +113,15 @@ class DB_Mysql_Vardiff(DB_Mysql.DB_Mysql):
|
|||||||
%(lres)s, %(result)s, %(reason)s, %(solution)s)
|
%(lres)s, %(result)s, %(reason)s, %(solution)s)
|
||||||
""",
|
""",
|
||||||
{
|
{
|
||||||
"time": v[4],
|
"time": data[4],
|
||||||
"host": v[6],
|
"host": data[6],
|
||||||
"uname": v[0],
|
"uname": data[0],
|
||||||
"lres": v[5],
|
"lres": data[5],
|
||||||
"result": v[5],
|
"result": data[5],
|
||||||
"reason": v[9],
|
"reason": data[9],
|
||||||
"solution": v[2]
|
"solution": data[2]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self.dbh.commit()
|
self.dbh.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user