consistent __exit__() argument names
This commit is contained in:
@@ -315,7 +315,7 @@ class apply():
|
|||||||
self.original.append((path, key, get(path, key, util.SENTINEL)))
|
self.original.append((path, key, get(path, key, util.SENTINEL)))
|
||||||
set(path, key, value)
|
set(path, key, value)
|
||||||
|
|
||||||
def __exit__(self, etype, value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
for path, key, value in self.original:
|
for path, key, value in self.original:
|
||||||
if value is util.SENTINEL:
|
if value is util.SENTINEL:
|
||||||
unset(path, key)
|
unset(path, key)
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ class DatabaseConnection():
|
|||||||
self.directory.cleanup()
|
self.directory.cleanup()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def __exit__(self, exc, value, tb):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
self.database.close()
|
self.database.close()
|
||||||
if self.directory:
|
if self.directory:
|
||||||
self.directory.cleanup()
|
self.directory.cleanup()
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.27.6"
|
__version__ = "1.27.7-dev"
|
||||||
__variant__ = None
|
__variant__ = None
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class lazy():
|
|||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
return self.buffer
|
return self.buffer
|
||||||
|
|
||||||
def __exit__(self, exc, value, tb):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
# get content of old file
|
# get content of old file
|
||||||
try:
|
try:
|
||||||
with open(self.path, encoding="utf-8") as fp:
|
with open(self.path, encoding="utf-8") as fp:
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ class TestPathfmt():
|
|||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, *args):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def open(self, mode):
|
def open(self, mode):
|
||||||
|
|||||||
Reference in New Issue
Block a user