From ec6ae815729423aac42c97efa5f64ea6d258297f Mon Sep 17 00:00:00 2001
From: Richard Heck <rgheck@comcast.net>
Date: Tue, 6 Jul 2010 13:36:33 +0000
Subject: [PATCH] No else after return.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34781 a592a061-630c-0410-9148-cb99ea01b6c8
---
 lib/lyx2lyx/lyx_2_0.py | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py
index 8a1ee0c765..1c95503f51 100644
--- a/lib/lyx2lyx/lyx_2_0.py
+++ b/lib/lyx2lyx/lyx_2_0.py
@@ -329,18 +329,17 @@ def revert_charstyles(document, name, LaTeXname, changed):
     i = find_token(document.body, name + ' on', i)
     if i == -1:
       return changed
+    j = find_token(document.body, name + ' default', i)
+    k = find_token(document.body, name + ' on', i + 1)
+    # if there is no default set, the style ends with the layout
+    # assure hereby that we found the correct layout end
+    if j != -1 and (j < k or k ==-1):
+      document.body[j:j+1] = put_cmd_in_ert("}")
     else:
-      j = find_token(document.body, name + ' default', i)
-      k = find_token(document.body, name + ' on', i + 1)
-      # if there is no default set, the style ends with the layout
-      # assure hereby that we found the correct layout end
-      if j != -1 and (j < k or k ==-1):
-      	document.body[j:j+1] = put_cmd_in_ert("}")
-      else:
-        j = find_token(document.body, '\\end_layout', i)
-        document.body[j:j] = put_cmd_in_ert("}")
-      document.body[i:i + 1] = put_cmd_in_ert(LaTeXname + "{")
-      changed = True
+      j = find_token(document.body, '\\end_layout', i)
+      document.body[j:j] = put_cmd_in_ert("}")
+    document.body[i:i + 1] = put_cmd_in_ert(LaTeXname + "{")
+    changed = True
     i += 1