An attempt at fixing some encoding issues
This patch unifies the hardcoded re-encoding attempts into a single function in utils.py. This function is used to take either an unicode or str object and convert it to a ASCII-only str object which can be safely displayed and transmitted. We replace then the current manual re-encodings with this function. In mcpu we stop re-encoding the hooks output and instead we do it right at the hook generation in backend.py. This passes on my 'custom' lvs output with non-ASCII chars. But there are probably other places we will need to fix. Reviewed-by: ultrotter
Showing
- lib/backend.py 3 additions, 3 deletionslib/backend.py
- lib/cli.py 2 additions, 1 deletionlib/cli.py
- lib/cmdlib.py 1 addition, 1 deletionlib/cmdlib.py
- lib/mcpu.py 0 additions, 1 deletionlib/mcpu.py
- lib/utils.py 22 additions, 1 deletionlib/utils.py
- scripts/gnt-cluster 1 addition, 1 deletionscripts/gnt-cluster
- scripts/gnt-job 2 additions, 1 deletionscripts/gnt-job
Loading
Please register or sign in to comment