[game-data-packager] 04/17: Fix signature of __exit__ methods
Simon McVittie
smcv at debian.org
Wed Dec 30 22:57:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 49723c41f1e069799c13f33ac16043670e4c6272
Author: Simon McVittie <smcv at debian.org>
Date: Wed Dec 30 21:54:06 2015 +0000
Fix signature of __exit__ methods
---
game_data_packager/build.py | 4 ++--
game_data_packager/unpack/umod.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 01fdb3a..7c53a8f 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -401,12 +401,12 @@ class PackagingTask(object):
self.game.load_file_data()
def __del__(self):
- self.__exit__()
+ self.__exit__(None, None, None)
def __enter__(self):
return self
- def __exit__(self, *ignored):
+ def __exit__(self, _et, _ev, _tb):
for d in self._cleanup_dirs:
shutil.rmtree(d, onerror=lambda func, path, ei:
logger.warning('error removing "%s":' % path, exc_info=ei))
diff --git a/game_data_packager/unpack/umod.py b/game_data_packager/unpack/umod.py
index b6e7e2d..f1dd84a 100644
--- a/game_data_packager/unpack/umod.py
+++ b/game_data_packager/unpack/umod.py
@@ -372,7 +372,7 @@ class Umod(StreamUnpackable):
def __enter__(self):
return self
- def __exit__(self):
+ def __exit__(self, _et, _ev, _tb):
if self.__close_file:
self.reader.close()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list