]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_2.py
UserGuide.lyx: fix some typographic issues spotted by Mike
[lyx.git] / lib / lyx2lyx / lyx_1_2.py
index 029c852e9e2bcfda0e21fc73e88c53c1894898bd..19b6647201df02942fba6bbc2e84593521341b26 100644 (file)
@@ -15,7 +15,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 """ Convert files to the file format generated by lyx 1.2"""
 
@@ -154,7 +154,7 @@ def remove_oldfloat(document):
         j = find_token(lines, "\\end_float", i+1)
 
         floattype = lines[i].split()[1]
-        if not floats.has_key(floattype):
+        if floattype not in floats:
             document.warning("Error! Unknown float type " + floattype)
             floattype = "fig"
 
@@ -284,7 +284,7 @@ def remove_pextra(document):
 
 def is_empty(lines):
     " Are all the lines empty?"
-    return filter(is_nonempty_line, lines) == []
+    return list(filter(is_nonempty_line, lines)) == []
 
 
 move_rexp =  re.compile(r"\\(family|series|shape|size|emph|numeric|bar|noun|end_deeper)")
@@ -358,7 +358,7 @@ def remove_oldert(document):
                     tmp.append(line)
 
             if is_empty(tmp):
-                if filter(lambda x:x != "", tmp) != []:
+                if [x for x in tmp if x != ""] != []:
                     if new == []:
                         # This is not necessary, but we want the output to be
                         # as similar as posible to the lyx format