telmich added the comment:

Background information:

cdist is written in python 3 and makes heavy use of argparse.
One common task is to run a cdist type with some arguments, which
in the end configure a remote system.

We triggered the bug by running

__line ps1 --file /etc/bash.bashrc --line "PS1='[\t] 
\[\033[1m\]\h\[\033[0m\]:\w\$ '"

which should have ensured that the line is found in /etc/bash.bashrc.

But in reality we found

PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w$ '

instead of

PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ '

This is a rather nasty bug, as you would not suspect argparse doing that and 
dig through all your code looking for errors.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to