xapi-project / xapi-storage

Experimental new storage interface for xapi
https://xapi-project.github.io/xapi-storage/
9 stars 19 forks source link

CA-283254: formatting strings with % and .format differ #81

Closed MarkSymsCtx closed 6 years ago

MarkSymsCtx commented 6 years ago

Especially in their handling of unicode string, with .format being better.

So, convert the logging in call to use this to avoid getting incorrect errors in failure conditions, otherwise an unhelpful error of the form UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 28: ordinal not in range(128) is produced, instead of what actually went wrong in the process call.

Generally tidy up some python style issues as well.

Signed-off-by: Mark Syms mark.syms@citrix.com

mseri commented 6 years ago

No, that's fine. It prints with the equivalent of str(d_value) if you don't specify a formatting style.

edwintorok commented 6 years ago

There is an unrelated travis failure in installing OCaml dependencies.