From 4ed5043c67848bf717e48bc509d959422c8faeb6 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 30 May 2015 12:03:13 +1200 Subject: Add coding style check, reformat. --- libpathod/language/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libpathod/language/__init__.py') diff --git a/libpathod/language/__init__.py b/libpathod/language/__init__.py index 2444d532..c3d34c2e 100644 --- a/libpathod/language/__init__.py +++ b/libpathod/language/__init__.py @@ -18,7 +18,7 @@ def parse_response(s): raise exceptions.ParseException("Spec must be valid ASCII.", 0, 0) try: return http.Response.expr().parseString(s, parseAll=True)[0] - except pp.ParseException, v: + except pp.ParseException as v: raise exceptions.ParseException(v.msg, v.line, v.col) @@ -39,7 +39,7 @@ def parse_requests(s): ] ) ).parseString(s, parseAll=True) - except pp.ParseException, v: + except pp.ParseException as v: raise exceptions.ParseException(v.msg, v.line, v.col) expanded = [] for i in reqs: @@ -67,8 +67,7 @@ def serve(msg, fp, settings): vals = msg.values(settings) vals.reverse() - actions = msg.actions[:] - actions.sort() + actions = sorted(msg.actions[:]) actions.reverse() actions = [i.intermediate(settings) for i in actions] -- cgit v1.2.3