Merge branch 'backend_manual' of gitlab2.kylin.com:kylin-desktop/update-manager-group/kylin-system-updater into backend_manual

This commit is contained in:
wangsong 2022-09-07 09:10:14 +08:00
commit d7c974e664
2 changed files with 3 additions and 2 deletions

View File

@ -160,7 +160,6 @@ class UpdateMsgCollector():
dict_message = self.convertor.JsonConvertDict(json_message)
if messageType == "":
messageType = "SystemUpdate"
logging.debug("messageType: %s, json_message: %s ", messageType, json_message)
if type(dict_message) != type(dict) and "appname" not in dict_message.keys():
raise AttributeError("'%s' object has no attribute '%s'" % ("dict message", "appname"))

View File

@ -132,7 +132,9 @@ class Sqlite3Server(object):
self.cursor.execute(sql)
rets = self.cursor.fetchall()
if len(rets)!= 0:
return str(rets[0])
if len(rets[0])!=0:
ret_first = rets[0]
return str(ret_first[0])
except Exception as e:
logging.error("Insert error: %s.", str(e))
logging.info(_("Database: Select data Complete..."))