From fca2eb93b02d227f476054da829e1e5ff0ebead0 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Tue, 19 Jun 2018 16:36:15 -0700 Subject: [PATCH] Remove dead code from HyASTCompiler.compile --- hy/compiler.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index a3f2b5c..8d7c81c 100755 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -348,21 +348,18 @@ class HyASTCompiler(object): return Result() try: ret = self.compile_atom(tree) - if ret: - self.update_imports(ret) - return ret + self.update_imports(ret) + return ret except HyCompileError: # compile calls compile, so we're going to have multiple raise # nested; so let's re-raise this exception, let's not wrap it in # another HyCompileError! raise - except HyTypeError as e: + except HyTypeError: raise except Exception as e: raise_empty(HyCompileError, e, sys.exc_info()[2]) - raise HyCompileError(Exception("Unknown type: `%s'" % _type)) - def _compile_collect(self, exprs, with_kwargs=False, dict_display=False, oldpy_unpack=False): """Collect the expression contexts from a list of compiled expression.