Better handling of GTK_IM_MODULE env var

Deleting env var only if it exists.
This commit is contained in:
ozzdemir 2022-01-28 08:00:22 +03:00
parent 1e8940039a
commit e9e8d7be19

View File

@ -56,12 +56,8 @@ from terminatorlib.configjson import ConfigJson
# Deleting env variable fixes double char problem when broadcasting (#78)
# Only delete if it exists, or exception occurs
try:
if os.environ.get('GTK_IM_MODULE') is not None:
del os.environ['GTK_IM_MODULE']
except Exception as e:
# Only exception is a key error, which states that env var does not exists
# So, it is okay to pass
pass
if __name__ == '__main__':
# Workaround for IBus intefering with broadcast when using dead keys