summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Kumar (raukadah) <raukadah@gmail.com>2019-05-20 14:01:40 +0530
committerJan Willhaus <mail@janwillhaus.de>2019-05-20 11:49:37 +0200
commita9cde4a9bff27544314f5a7ca13d22aaaac9d884 (patch)
treeacb71abb5b1fe0d24953c1792fd3a8d0f060f7ed
parent3c3f849864d2d61c8b79e3313c947f63de7b04a4 (diff)
downloadwarlock-release1.3.2.tar.gz
use io module for handling encoding while opening file in setup.pyrelease1.3.2
Currently in release 1.3.2 is failing while doing python setup.py install with TypeError: 'encoding' is an invalid keyword argument for this function while reading warlock/setup.py", line 28, in read os.path.join(os.path.dirname(__file__), fname), "r", encoding="utf-8" By using io module while reading the file fixes the issue. Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
-rw-r--r--setup.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 377ad1f..1cdd01a 100644
--- a/setup.py
+++ b/setup.py
@@ -13,18 +13,19 @@
# limitations under the License.
import setuptools
+import io
import os
def parse_requirements():
- fap = open("requirements.txt", "r", encoding="utf-8")
+ fap = io.open("requirements.txt", "r", encoding="utf-8")
raw_req = fap.read()
fap.close()
return raw_req.split("\n")
def read(fname):
- with open(
+ with io.open(
os.path.join(os.path.dirname(__file__), fname), "r", encoding="utf-8"
) as fp:
return fp.read()