mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
@techalchemy
__enter__ methods return instances of the object, not a property of them :) Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
+1
-1
@@ -1159,7 +1159,7 @@ class TemporaryDirectory(object):
|
||||
return "<{} {!r}>".format(self.__class__.__name__, self.name)
|
||||
|
||||
def __enter__(self):
|
||||
return self.name
|
||||
return self
|
||||
|
||||
def __exit__(self, exc, value, tb):
|
||||
self.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user