notmuch/devel
W. Trevor King fd29d3f4fb nmbug-status: Decode Popen output using the user's locale
Avoid:

  $ ./nmbug-status --list-views
  Traceback (most recent call last):
    File "./nmbug-status", line 47, in <module>
      'cat-file', 'blob', sha1+':status-config.json'],
  TypeError: can't concat bytes to str

by explicitly converting the byte-stream read from Popen into a
Unicode string.  On Python 2, this conversion is str -> unicode; on
Python 3 it is bytes -> str.

_ENCODING is derived from the user's locale (or system default) in an
attempt to match Git's output encoding.  It may be more robust to skip
the encoding/decoding by using a Python wrapper like pygit2 [1] for
Git access.  That's a fairly heavy dependency though, and using the
locale will probably work.

[1]: http://www.pygit2.org/
2014-02-10 21:04:55 -04:00
..
nmbug nmbug-status: Decode Popen output using the user's locale 2014-02-10 21:04:55 -04:00
doxygen.cfg devel: add doxygen configuration file 2014-01-05 08:59:52 -04:00
man-to-mdwn.pl devel: add post-release tools news2wiki.pl and man-to-mdwn.pl 2013-03-29 09:23:19 -04:00
news2wiki.pl devel: add post-release tools news2wiki.pl and man-to-mdwn.pl 2013-03-29 09:23:19 -04:00
printmimestructure devel: add dkg's printmimestructure script to notmuch devel scripts 2013-05-23 08:01:37 -03:00
release-checks.sh devel/release-checks.sh: adjust to LIBNOTMUCH version checks 2013-12-30 20:39:25 -04:00
RELEASING Start devel directory for developer tools and documentation. 2012-01-17 22:53:31 -04:00
schemata search: Add stable queries to thread search results 2013-11-08 20:43:29 -04:00
STYLE devel/STYLE: information how to enable standard pre-commit hook 2013-03-29 09:21:44 -04:00
TODO emacs: Fix search tagging races 2013-11-08 20:52:00 -04:00
uncrustify.cfg uncrustify.cfg: added 3 new types for uncrustify to know 2012-11-07 08:00:03 -04:00