Merge branch 'backend_dev' of gitlab2.kylin.com:kylin-desktop/update-manager-group/kylin-system-updater into backend_dev
This commit is contained in:
commit
f0b5b4687f
|
@ -62,13 +62,13 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
interface = dbus.Interface(obj, dbus_interface='com.kylin.software.properties.interface')
|
||||
retval = interface.updateSourceTemplate(timeout=5)
|
||||
except Exception as e:
|
||||
header = _("Failed to get update software push, please try to update again later")
|
||||
header = _("Unable to access the source management server")
|
||||
desc = str(e)
|
||||
logging.error("update sourceTemplate Failed and Error mes:%s"%str(e))
|
||||
return False,header,desc
|
||||
|
||||
if retval == False:
|
||||
header = _("Failed to get update software push, please try to update again later")
|
||||
header = _("Unable to access the source management server")
|
||||
desc = _("Connection exception with push server")
|
||||
logging.warning(header + desc)
|
||||
return retval,header,desc
|
||||
|
|
|
@ -70,6 +70,14 @@ if __name__ == "__main__":
|
|||
else:
|
||||
logging.basicConfig(format=FORMAT,level=logging.DEBUG,filename = logfile(),filemode = 'a')
|
||||
|
||||
if sys.getfilesystemencoding() == "ascii" and not "LANG" in os.environ:
|
||||
logging.info('start setting environ["LANG"] ...')
|
||||
os.environ["LANG"] = "C.UTF-8"
|
||||
os.execv(sys.argv[0], sys.argv)
|
||||
|
||||
# if not "LANGUAGE" in os.environ:
|
||||
# os.environ["LANGUAGE"] = "zh_CN.UTF-8"
|
||||
|
||||
# logging.info('kylin-system-updater(lang:%s) starting ...',os.environ["LANGUAGE"])
|
||||
logging.info('kylin-system-updater starting ...')
|
||||
|
||||
|
|
|
@ -2553,7 +2553,7 @@ msgstr ""
|
|||
msgid "%.0f kB"
|
||||
msgstr "%.0f kB"
|
||||
|
||||
msgid "Failed to get update software push, please try to update again later"
|
||||
msgid "Unable to access the source management server"
|
||||
msgstr "无法访问源管理服务器,请稍后再试"
|
||||
|
||||
msgid "Connection exception with push server"
|
||||
|
|
Loading…
Reference in New Issue