diff --git a/py/Boinc/boincxml.py b/py/Boinc/boincxml.py index 34902055a5..6871045ca2 100644 --- a/py/Boinc/boincxml.py +++ b/py/Boinc/boincxml.py @@ -120,9 +120,9 @@ class XMLConfig: return self def read(self, failopen_ok=False): """Read the XML object's file source and return self.""" - if failopen_ok and not os.path.exists(self.filename) + if failopen_ok and not os.path.exists(self.filename): self._init_empty_xml() - return self; + return self try: self.xml = xml.dom.minidom.parse(self.filename) strip_white_space(self.xml)