eric6/ThirdParty/Jasy/jasy/script/tokenize/Tokenizer.py

changeset 7239
3e9e09a49cf5
parent 6942
2602857055c5
--- a/eric6/ThirdParty/Jasy/jasy/script/tokenize/Tokenizer.py	Mon Sep 16 18:42:22 2019 +0200
+++ b/eric6/ThirdParty/Jasy/jasy/script/tokenize/Tokenizer.py	Mon Sep 16 18:56:09 2019 +0200
@@ -162,7 +162,7 @@
         startLine = self.line
 
         # Whether this is the first called as happen on start parsing a file (eat leading comments/white space)
-        startOfFile = self.cursor is 0
+        startOfFile = self.cursor == 0
 
         indent = ""
 
@@ -254,7 +254,7 @@
 
                 try:
                     self.comments.append(Comment.Comment(text, mode, self.line-1, "", self.fileId))
-                except Comment.CommentException:
+                except Comment.CommentException as commentError:
                     Console.error("Ignoring comment in %s: %s", self.fileId, commentError)
 
             # check for whitespace, also for special cases like 0xA0

eric ide

mercurial