"Added music" multimedia test fails if XDG_MUSIC_DIR does not start $HOME
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Accomplishments Daemon |
New
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
* Running Accomplishments 0.3~precise2 from stable PPA
* Set XDG_MUSIC_DIR to any path not starting with $HOME (e.g. /home/shared/Music as opposed to $HOME/Music)
* Wait for "Added music" test to run
What should happen:
* Test runs against alternate folder
What happens instead:
2013-11-23 12:23:48+0200 [-] Running ubuntu-
2013-11-23 12:23:48+0200 [-] 'Got non-zero exit code for process: '
2013-11-23 12:23:48+0200 [-] Traceback (most recent call last):
File "/usr/share/
test_
File "/usr/share/
dirList = os.listdir(
OSError: [Errno 2] No such file or directory: '/home/
The test in this PPA matches the latest from the code repository. The following change stopped the bug, and allowed me to earn the trophy:
...
if musicDir[15:20] == "$HOME": join(homedir, musicDir[21:-2])
# generate home-based path
music = os.path.
else:
# extract non-home-based path
music = musicDir[15:-2]
# test valid path for music isdir(music) : for_music( music)
if os.path.
test_
#user has no music
sys.exit(1)