return hash(self.Target.Path)\r
\r
def __eq__(self, Other):\r
- if type(Other) == type(self):\r
+ if isinstance(Other, type(self)):\r
return Other.Target.Path == self.Target.Path\r
else:\r
return str(Other) == self.Target.Path\r
# Clean up the line and replace path separator with native one\r
Line = self.RuleContent[Index].strip().replace(self._PATH_SEP, os.path.sep)\r
self.RuleContent[Index] = Line\r
- \r
+\r
# find the build_rule_version\r
- if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) <> -1:\r
- if Line.find("=") <> -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():\r
+ if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) != -1:\r
+ if Line.find("=") != -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():\r
self._FileVersion = (Line[(Line.find("=") + 1):]).split()[0]\r
# skip empty or comment line\r
if Line == "" or Line[0] == "#":\r