From: Zac Medico Date: Thu, 1 Dec 2011 20:34:52 +0000 (-0800) Subject: MergeProcess: check if _elog_reader_fd is None X-Git-Tag: v2.2.0_alpha80~80 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d365eb3a6187ffcfccd1e68e637698d52e02070b;p=portage.git MergeProcess: check if _elog_reader_fd is None It seems saner to check for None, given that _elog_reader_fd is an int, even though it will probably never be zero. --- diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index c9b628865..df501be38 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -212,7 +212,7 @@ class MergeProcess(SpawnProcess): if self._elog_reg_id is not None: self.scheduler.unregister(self._elog_reg_id) self._elog_reg_id = None - if self._elog_reader_fd: + if self._elog_reader_fd is not None: os.close(self._elog_reader_fd) self._elog_reader_fd = None if self._elog_keys is not None: