去掉返回值
This commit is contained in:
parent
00b321556d
commit
df47d23c61
|
@ -679,13 +679,10 @@ def LockedPreventShutdown():
|
||||||
'Kylin System Updater', 'Installing Packages',
|
'Kylin System Updater', 'Installing Packages',
|
||||||
'block')),
|
'block')),
|
||||||
None, 0, -1, None, None)
|
None, 0, -1, None, None)
|
||||||
inhibitor = Gio.UnixInputStream(fd=fdlist.steal_fds()[var[0]])
|
inhibit_lock = Gio.UnixInputStream(fd=fdlist.steal_fds()[var[0]])
|
||||||
logging.info("Shutdown Has been locked...")
|
logging.info("Shutdown Has been locked...")
|
||||||
inhibit_lock = inhibitor
|
|
||||||
return True
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(e)
|
logging.error(e)
|
||||||
return False
|
|
||||||
|
|
||||||
#解锁禁止关机
|
#解锁禁止关机
|
||||||
def unLockedEnableShutdown():
|
def unLockedEnableShutdown():
|
||||||
|
@ -697,10 +694,8 @@ def unLockedEnableShutdown():
|
||||||
inhibit_lock == None
|
inhibit_lock == None
|
||||||
else:
|
else:
|
||||||
logging.info("Not locked and Quitting ...")
|
logging.info("Not locked and Quitting ...")
|
||||||
return False
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("unlock failed." + str(e))
|
logging.error("unlock failed." + str(e))
|
||||||
return False
|
|
||||||
|
|
||||||
# 查看uu进程是否需要kill
|
# 查看uu进程是否需要kill
|
||||||
def kill_process(path):
|
def kill_process(path):
|
||||||
|
|
Loading…
Reference in New Issue