Skip to content

Commit

Permalink
wmltools: Use isinstance to check if a variable is a string
Browse files Browse the repository at this point in the history
Using the built-in basestring.
  • Loading branch information
legoktm committed Jul 27, 2015
1 parent 1ea5886 commit de864c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/tools/wesnoth/wmltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def mark_matching_resources(self, pattern, fn, n):
return key
def visible_from(self, defn, fn, n):
"Is specified definition visible from the specified file and line?"
if type(defn) == type(""):
if isinstance(defn, basestring):
defn = self.fileref[defn]
if defn.undef is not None:
# Local macros are only visible in the file where they were defined
Expand Down

0 comments on commit de864c0

Please sign in to comment.