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

unable to open() files with mode="xb" #147

Closed
FelixSchwarz opened this issue Dec 21, 2016 · 3 comments
Closed

unable to open() files with mode="xb" #147

FelixSchwarz opened this issue Dec 21, 2016 · 3 comments
Assignees
Labels

Comments

@FelixSchwarz
Copy link

Python 3.5.2 (default, Sep 14 2016, 11:28:32) 
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyfakefs.fake_filesystem_unittest import Patcher
>>> stubber = Patcher()
>>> stubber.setUp()
>>> fp = open('foo.txt', 'xb')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "…/pyfakefs/fake_filesystem.py", line 3416, in __call__
    return self.Call(*args, **kwargs)
  File "…/pyfakefs/fake_filesystem.py", line 3459, in Call
    raise ValueError('Invalid mode: %r' % orig_modes)
ValueError: Invalid mode: 'xb'
@mrbean-bremen
Copy link
Member

@FelixSchwarz - please check if this fixes your problem.

@FelixSchwarz
Copy link
Author

Yes, this works for me. Thank you very much!

@mrbean-bremen
Copy link
Member

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants