rhevm-qe-automation / pytest_jira

py.test plugin to integrate with JIRA
GNU General Public License v2.0
29 stars 25 forks source link

password cannot contain the character '%' in its value #115

Closed ajeain closed 4 years ago

ajeain commented 4 years ago

I have the following in jira.cfg: username = automation password = 3#%SS

which is a valid value for password (jira works with it) but when I run pytest with the --jira switch, I get the following Syntax Error:

File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec return self._inner_hookexec(hook, methods, kwargs) File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 81, in firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall return outcome.get_result() File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result raise ex[1].with_traceback(ex[2]) File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall res = hook_impl.function(*args) File "/usr/local/lib/python3.7/site-packages/pytest_jira.py", line 376, in pytest_addoption default=_get_value(config, 'DEFAULT', 'password'), File "/usr/local/lib/python3.7/site-packages/pytest_jira.py", line 327, in _get_value return config.get(section, name) File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 799, in get d) File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 394, in before_get self._interpolate_some(parser, option, L, value, section, defaults, 1) File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 444, in _interpolate_some "found: %r" % (rest,)) configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%SS'

ajeain commented 4 years ago

found a solution: placing % before the %, so basically, having 3#%%SS solve the issue for now