From 77101ed4fcb814597db6d4af60c5111bb24bd41d Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 9 Jan 2019 12:21:36 -0500 Subject: [PATCH] Handle encoding when opening file for both py2/py3 --- README.rst | 2 +- setup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 82c72f43c61..0f05649a96c 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ What is SaltStack? ================== -SaltStack makes software for complex systems management at scale. +SaltStack makes software for complex systems management at scale. SaltStack is the company that created and maintains the Salt Open project and develops and sells SaltStack Enterprise software, services and support. Easy enough to get running in minutes, scalable enough to diff --git a/setup.py b/setup.py index bb4557218ec..4ec76899d12 100755 --- a/setup.py +++ b/setup.py @@ -855,7 +855,10 @@ class SaltDistribution(distutils.dist.Distribution): self.name = 'salt-ssh' if PACKAGED_FOR_SALT_SSH else 'salt' self.salt_version = __version__ # pylint: disable=undefined-variable self.description = 'Portable, distributed, remote execution and configuration management system' - with open(SALT_LONG_DESCRIPTION_FILE, encoding='utf-8') as f: + kwargs = {} + if IS_PY3: + kwargs['encoding'] = 'utf-8' + with open(SALT_LONG_DESCRIPTION_FILE, **kwargs) as f: self.long_description = f.read() self.long_description_content_type = 'text/x-rst' self.author = 'Thomas S Hatch'