From: Grant Likely <grant.likely-5wv7dgnIgG8@public.gmane.org>
To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: nd-5wv7dgnIgG8@public.gmane.org,
Grant Likely <grant.likely-5wv7dgnIgG8@public.gmane.org>
Subject: [PATCH 2/4] fix python3 compatibility
Date: Tue, 15 Sep 2020 10:03:33 +0100 [thread overview]
Message-ID: <20200915090335.9167-3-grant.likely@arm.com> (raw)
In-Reply-To: <20200915090335.9167-1-grant.likely-5wv7dgnIgG8@public.gmane.org>
Fix query of git commit tag to work with python3. The existing code
falls over when using Sphinx on Python 3 due to the string datatype
changes. Fix the code to be more robust.
Signed-off-by: Grant Likely <grant.likely-5wv7dgnIgG8@public.gmane.org>
---
source/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/conf.py b/source/conf.py
index c6cddb9..c84edc3 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -66,7 +66,7 @@ author = u'devicetree.org'
#
# The short X.Y version.
try:
- version = subprocess.check_output(["git", "describe", "--dirty"]).strip().encode()
+ version = str(subprocess.check_output(["git", "describe", "--dirty"]), 'utf-8').strip()
except:
version = "unknown-rev"
# The full version, including alpha/beta/rc tags.
--
2.20.1
next prev parent reply other threads:[~2020-09-15 9:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 9:03 [PATCH 0/4] Devicetree spec build environment changes Grant Likely
[not found] ` <20200915090335.9167-1-grant.likely-5wv7dgnIgG8@public.gmane.org>
2020-09-15 9:03 ` [PATCH 1/4] trivial: Add chapter number to source files Grant Likely
2020-09-15 9:03 ` Grant Likely [this message]
2020-09-15 9:03 ` [PATCH 3/4] Update Makefile to newer Sphinx 'minimal' style Grant Likely
2020-09-15 9:03 ` [PATCH 4/4] Updates to match Sphinx templates Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200915090335.9167-3-grant.likely@arm.com \
--to=grant.likely-5wv7dgnigg8@public.gmane.org \
--cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nd-5wv7dgnIgG8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).