Commits

Anonymous committed f606cb1

Broken config files are skipped.

- Correctly iterate through disks while mounting and unmounting.

Comments (0)

Files changed (1)

src/gemrb_launcher.py

         parser = SectionlessConfigParser()
         parser.optionxform = str # case sensitive!
 
-        parser.read(self.config_file)
+        try:
+            parser.read(self.config_file)
+        except configparser.ParsingError:
+            return # skip broken files.
 
         DEFAULT = SectionlessConfigParser.DEFAULT_SECTION
 
 
             self.call_command("pre_mount_command")
 
-            for image, mountpoint in self.config.cd_data:
+            for image, mountpoint in self.config.cd_data.iteritems():
                 if image and mountpoint:
                     command = """%s "%s" "%s" """ % (mount, image, mountpoint)
                     subprocess.call(command.split())
 
             self.call_command("pre_unmount_command")
 
-            for image, mountpoint in self.config.cd_data:
+            for image, mountpoint in self.config.cd_data.iteritems():
                 if mountpoint:
                     command = """%s "%s" """ % (unmount, mountpoint)
                     subprocess.call(command.split())