]> git.lyx.org Git - features.git/commitdiff
Simplify this complicated routine of mine now.
authorRichard Heck <rgheck@comcast.net>
Fri, 5 Nov 2010 15:13:42 +0000 (15:13 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 5 Nov 2010 15:13:42 +0000 (15:13 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36116 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 87af4ce15110ed6f8dba1a5483ec62a65a666ebc..9ebc31e548eb0efa1c31c87f8e7c844405214103 100644 (file)
@@ -1282,13 +1282,8 @@ def revert_lyx_version(document):
         # type  "lyxinfo"
         # arg   "version"
         # \end_inset
-        # but we shall try to be forgiving.
-        arg = typ = ""
-        for k in range(i, j):
-            if document.body[k].startswith("arg"):
-                arg = document.body[k][3:].strip().strip('"')
-            if document.body[k].startswith("type"):
-                typ = document.body[k][4:].strip().strip('"')
+        typ = get_quoted_value(document.body, "type", i, j)
+        arg = get_quoted_value(document.body, "arg", i, j)
         if arg != "version" or typ != "lyxinfo":
             i = j + 1
             continue