]> git.lyx.org Git - lyx.git/commitdiff
Just do the best we can here.
authorRichard Heck <rgheck@comcast.net>
Sun, 18 Apr 2010 22:24:14 +0000 (22:24 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 18 Apr 2010 22:24:14 +0000 (22:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34211 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 7488d589f59f99f118ccf87ec51ec9fb1c989a78..71489a11443e02a6eceab435f50ea5015bb54a68 100644 (file)
@@ -1468,11 +1468,13 @@ def revert_shadedboxcolor(document):
 
 def revert_lyx_version(document):
     " Reverts LyX Version information from Inset Info "
-    # let's figure out why this doesn't work in the build directory.
-    # import lyx2lyx_version
-    # version = lyx2lyx_version.version
-    version = "2.0.0svn"
-               
+    version = "LyX version"
+    try:
+        import lyx2lyx_version
+        version = lyx2lyx_version.version
+    except:
+           pass
+       
     i = 0
     while 1:
         i = find_token(document.body, '\\begin_inset Info', i)
@@ -1497,6 +1499,7 @@ def revert_lyx_version(document):
         if arg != "version" or typ != "lyxinfo":
             i = j+1
             continue
+
         # We do not actually know the version of LyX used to produce the document.
         # But we can use our version, since we are reverting.
         s = [version]