# Buggy code
def setConfig(self, button):
    try:
        if os.path.exists("/opt/sublime_text/sublime_text"):
            Popen(
                [
                    "/opt/sublime_text/sublime_text",
                    os.environ["HOME"] + "/.config/kinto/kinto.py",
                ]
            )
        elif which(gedit) is not None:
            Popen(["gedit", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which(mousepad) is not None:
            Popen(["mousepad", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which(kate) is not None:
            Popen(["kate", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which(kwrite) is not None:
            Popen(["kwrite", os.environ["HOME"] + "/.config/kinto/kinto.py"])

    except CalledProcessError:  # Notify user about error on running restart commands.
        Popen(["notify-send", "Kinto: Error could not open config file!"])


# Traceback (NameError)
Traceback (most recent call last):
File "/home/nemokden/.config/kinto/kintotray.py", line 623, in setConfig
elif which(gedit) is not None:
NameError: name 'gedit' is not defined
Traceback (most recent call last):
File "/home/nemokden/.config/kinto/kintotray.py", line 635, in setService
elif which(gedit) is not None:
NameError: name 'gedit' is not defined
Traceback (most recent call last):
File "/home/nemokden/.config/kinto/kintotray.py", line 694, in setSysKB
Popen(['gnome-control-center','keyboard'])
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] 그런 파일이나 디렉터리가 없습니다: 'gnome-control-center'
Traceback (most recent call last):
File "/home/nemokden/.config/kinto/kintotray.py", line 700, in setRegion
Popen(['gnome-control-center','region'])
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] 그런 파일이나 디렉터리가 없습니다: 'gnome-control-center'

# Fixed code
def setConfig(self, button):
    try:
        if os.path.exists("/opt/sublime_text/sublime_text"):
            Popen(
                [
                    "/opt/sublime_text/sublime_text",
                    os.environ["HOME"] + "/.config/kinto/kinto.py",
                ]
            )
        elif which("gedit") is not None:
            Popen(["gedit", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which("mousepad") is not None:
            Popen(["mousepad", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which("kate") is not None:
            Popen(["kate", os.environ["HOME"] + "/.config/kinto/kinto.py"])
        elif which("kwrite") is not None:
            Popen(["kwrite", os.environ["HOME"] + "/.config/kinto/kinto.py"])

    except CalledProcessError:  # Notify user about error on running restart commands.
        Popen(["notify-send", "Kinto: Error could not open config file!"])