Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make smart_open a no-op if passed a file-like #32

Merged
merged 2 commits into from
Sep 16, 2015

Conversation

gojomo
Copy link
Contributor

@gojomo gojomo commented Sep 16, 2015

If rather than a string URI/path, smart_open() receives an object with a read attribute, pass it through: it's arguably already 'open'.

@@ -47,6 +47,7 @@ def read(fname):
'boto >= 2.32',
'httpretty==0.8.6',
'bz2file',
'requests',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for? I can't see any such dependency in smart_open.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, it's one of the recent additions by @ziky90 , I didn't have that pulled locally yet. Cheers!

piskvorky added a commit that referenced this pull request Sep 16, 2015
make smart_open a no-op if passed a file-like
@piskvorky piskvorky merged commit d547718 into piskvorky:master Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants