优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import traceback
|
||||
import threading
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
@@ -13,14 +14,14 @@ def Save():
|
||||
try:
|
||||
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
||||
os.mknod("{}/.config/gx-env/nosandbox".format(homePath))
|
||||
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
||||
if not allCommandAddNoSandbox.isChecked() and os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
||||
os.remove("{}/.config/gx-env/nosandbox".format(homePath))
|
||||
os.system("pkexec env `printenv` gx-env-run")
|
||||
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
|
||||
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.print_exc())
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
|
||||
Reference in New Issue
Block a user