summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorA_D <A_D@snoonet.org>2018-12-26 20:37:56 +0200
committerTingPing <tingping@tingping.se>2018-12-26 16:58:46 -0500
commit3ebfa83fdd43335da1dd2d39f0bfae91d67b8c90 (patch)
tree40a4081ba673b08bd1cd9ed03dcd268a56343c81 /plugins
parented55330153e7d85e753d1321c4e46e9bb6833735 (diff)
python: Made sure to set sys.argv if it is not set. fixes #2282
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/python.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/python/python.py b/plugins/python/python.py
index 1eeb10b4..942b0ce5 100644
--- a/plugins/python/python.py
+++ b/plugins/python/python.py
@@ -10,6 +10,9 @@ import traceback
 import weakref
 from _hexchat_embedded import ffi, lib
 
+if not hasattr(sys, 'argv'):
+    sys.argv = ['<hexchat>']
+
 VERSION = b'2.0'  # Sync with hexchat.__version__
 PLUGIN_NAME = ffi.new('char[]', b'Python')
 PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface'