Skip to content

Commit 2217fbb

Browse files
author
Juliya Smith
authored
Bugfix/encoding py2 (#16)
1 parent 0de1f29 commit 2217fbb

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
The intended audience of this file is for py42 consumers -- as such, changes that don't affect
99
how a consumer would use the library (e.g. adding unit tests, updating documentation, etc) are not captured here.
1010

11+
12+
## 0.4.2 - 2020-03-13
13+
14+
### Fixed
15+
16+
- Bug where encoding would cause an error when opening files on python2.
17+
1118
## 0.4.1 - 2020-03-13
1219

1320
### Fixed
@@ -16,7 +23,6 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta
1623
- Bug where `profile show` indicated a password was set for a different profile.
1724
- We now validate credentials when setting a password.
1825

19-
2026
### Changed
2127

2228
- Date inputs are now required to be in quotes when they include a time.

src/code42cli/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.1"
1+
__version__ = "0.4.2"

src/code42cli/compat.py

+3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
from urlparse import urljoin, urlparse
1616

1717
str = unicode
18+
import io
19+
open = io.open
1820

1921
import repr as reprlib
2022
else:
2123
from urllib.parse import urljoin, urlparse
2224

2325
str = str
26+
open = open
2427

2528
import reprlib

src/code42cli/util.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import sys
44
from os import path, makedirs
5+
from code42cli.compat import open
56

67

78
def get_input(prompt):

0 commit comments

Comments
 (0)