summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2014-12-10 16:14:47 -0600
committerAndy Doan <andy.doan@linaro.org>2014-12-11 14:00:07 -0600
commit73b08e291be1190d9601705d828b2307c24fbc1f (patch)
tree7fecb4d7dff29284a1594fddb5e487242cdfb879
parent15d5c7cfb778b3a805fe25893071e9155d4b89b3 (diff)
utils.py: remove weird at-exit logic
Change-Id: Ic02c3f9f185f1abf881952d11d56f5641cf38e44
-rw-r--r--apps/patchwork/utils.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/patchwork/utils.py b/apps/patchwork/utils.py
index b902b4c..9fdd29c 100644
--- a/apps/patchwork/utils.py
+++ b/apps/patchwork/utils.py
@@ -32,13 +32,6 @@ from patchwork.models import Bundle, BundlePatch, Patch, Person, State
from patchwork.parser import hash_patch, parse_patch
-def close_fo(fo):
- """Very simple function to close a file object.
-
- :param fo: The file object to close.
- """
- fo.close()
-
# Timeout for git operations.
GIT_TIMEOUT = 120 * 60
# FIXME This is a temporary solution, a workardound for bug 1017933.
@@ -46,7 +39,7 @@ GIT_TIMEOUT = 120 * 60
REPO_BRANCHES = {'cpufreq': 'origin/next'}
DEVNULL = open(os.devnull, "w")
-atexit.register(close_fo, DEVNULL)
+atexit.register(DEVNULL.close)
# Default date format.
DATE_FORMAT = '%Y-%m-%d %H:%M:%S.%f'