コード例 #1
0
    def _get_emaint_binhost(self):
        """Obtain a reference to the binhost module class

		@sets: self.binhost to BinhostHandler class
		@rtype: boolean
		"""
        try:
            self.emaint_control = Modules()
            self.binhost = self.emaint_control._get_class('binhost')
        except InvalidModuleName as er:
            print(pp.error("Error importing emaint binhost module"),
                  file=sys.stderr)
            print(pp.error("Original error: " + er), file=sys.stderr)
        except:
            return False
        return True
コード例 #2
0
    def _get_emaint_binhost(self):
        """Obtain a reference to the binhost module class

		@sets: self.binhost to BinhostHandler class
		@rtype: boolean
		"""
        # About noqa below: I don't understand how this code can run at all.
        # TODO: verify soundness
        try:
            self.emaint_control = Modules()  # noqa
            self.binhost = self.emaint_control._get_class('binhost')
        except InvalidModuleName as er:  # noqa
            print(pp.error("Error importing emaint binhost module"),
                  file=sys.stderr)
            print(pp.error("Original error: " + er), file=sys.stderr)
        except:
            return False
        return True