From 90e8e2e537b387dda3a7076df597be14483f2968 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 4 Jun 2011 13:08:22 +0000 Subject: [PATCH] Let lyx2lyx work when we don't yet have a format change in 2.1. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38947 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/LyX.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 5bb1472feb..3ae0f3e857 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -82,7 +82,8 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("1_5", range(246,277), minor_versions("1.5" , 7)), ("1_6", range(277,346), minor_versions("1.6" , 10)), ("2_0", range(347,414), minor_versions("2.0", 0)), - ("2_1", [], minor_versions("2.1", 0))] + ("2_1", [], minor_versions("2.1", 0)) + ] #################################################################### # This is useful just for development versions # @@ -125,7 +126,11 @@ def format_info(): def get_end_format(): " Returns the more recent file format available." - return format_relation[-1][1][-1] + # this check will fail only when we have a new version + # and there is no format change yet. + if format_relation[-1][1]: + return format_relation[-1][1][-1] + return format_relation[-2][1][-1] def get_backend(textclass): -- 2.39.5