From 1adf64839a8c04477f74efac953949740334b860 Mon Sep 17 00:00:00 2001 From: "Paul R. Tagliamonte" Date: Wed, 10 Apr 2013 21:44:23 -0400 Subject: [PATCH] Updating travis; exceptions. --- .travis.yml | 11 ++++++++--- hy/compiler.py | 12 +++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ad0a9a0..7b40ddc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,11 @@ notifications: channels: - "irc.freenode.net#woo-city-commits" - "irc.freenode.net#hy" - on_success: always - on_failure: always - use_notice: true + on_success: change + on_failure: change + use_notice: false + +# blacklist +branches: + except: + - debian diff --git a/hy/compiler.py b/hy/compiler.py index ad14379..4187d6a 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -129,9 +129,12 @@ class HyASTCompiler(object): # another HyCompileError! raise except Exception as e: - raise HyCompileError(exception=e, - start_line=getattr(e, "start_line", 0), - start_column=getattr(e, "start_column", 0)) + if isinstance(e, HyError): + raise HyCompileError( + exception=e, + start_line=getattr(e, "start_line", 0), + start_column=getattr(e, "start_column", 0)) + raise raise HyCompileError( "Unknown type - `%s' - %s" % (str(type(tree)), tree)) @@ -630,6 +633,9 @@ class HyASTCompiler(object): if type(call) != ast.Call: raise TypeError("kwapplying a non-call") + if type(kwargs) != HyDict: + raise TypeError("kwapplying with a non-dict") + call.keywords = [ast.keyword(arg=ast_str(x), value=self.compile(kwargs[x])) for x in kwargs]