diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2014-01-05 23:59:34 +0100 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2014-01-05 23:59:34 +0100 |
| commit | d2efbcafaa2e6a9281fbda54813aaec3ec225f30 (patch) | |
| tree | a8dabe95543f752aa888b89d796a268b5531d7bd /py3status/__init__.py | |
| parent | e8b6894f67894674f16fbc7a6a4afff9427c944e (diff) | |
add validation for the position parameter
Diffstat (limited to 'py3status/__init__.py')
| -rwxr-xr-x | py3status/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py index cb24d39..1c1ac7e 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -479,6 +479,9 @@ class Module(Thread): assert 'full_text' in result, "missing 'full_text' key" assert 'name' in result, "missing 'name' key" + # validate the position + assert isinstance(position, int), "position is not an int" + # initialize method object if my_method['name'] is None: my_method['name'] = result['name'] |
