~/.local/share/rhythmbox/plugins/record-station/default.conf never read because of ~/.rbrec_conf

Bug #1259534 reported by Hans Deragon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rhythmbox-record-station
New
Undecided
Unassigned

Bug Description

~/.local/share/rhythmbox/plugins/record-station/default.conf is never read because of ~/.rbrec_conf. Turns out that if ~/.rbec_conf does not exist, it is created with size 0 bytes by Rhythmbox before the plugin is initialized. When the plugin is executed, if find ~/.rbec_conf empty and complains that section [Ripping] does not exist.

Faulty code in record_station.py:

  self.config_file = os.path.expanduser("~") + "/.rbrec_conf"
  if os.path.isfile(self.config_file):
   self.config.read(self.config_file) <<<<<<-- Always executed
  else:
   # default options <<<<<<-- Never executed.
   sys.stderr.write(os.path.join(os.environ['HOME'], '.local/share/rhythmbox/plugins/record-station/default.conf\n'))
   self.config.read( os.path.join(os.environ['HOME'], '.local/share/rhythmbox/plugins/record-station/default.conf'))
  # replace XDG_MUSIC_DIR with user's music directory
  if self.config.get("Ripping", "defaultdir") == "XDG_MUSIC_DIR": <<<<<---- Exception thrown here.
   self.config.set("Ripping", "defaultdir", self.get_xdg_music_dir())

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.