Merge lp:~terceiro/lava-dispatcher/skip-non-config-files into lp:lava-dispatcher

Proposed by Antonio Terceiro
Status: Merged
Approved by: Senthil Kumaran S
Approved revision: 639
Merged at revision: 639
Proposed branch: lp:~terceiro/lava-dispatcher/skip-non-config-files
Merge into: lp:lava-dispatcher
Diff against target: 13 lines (+3/-2)
1 file modified
lava_dispatcher/config.py (+3/-2)
To merge this branch: bzr merge lp:~terceiro/lava-dispatcher/skip-non-config-files
Reviewer Review Type Date Requested Status
Senthil Kumaran S Approve
Review via email: mp+176291@code.launchpad.net

Description of the change

This allows you to temporarily "disable" some device conf file by renaming it
in a way that the filename does not end with .conf (e.g. foo01.conf.off)

To post a comment you must log in.
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/config.py'
2--- lava_dispatcher/config.py 2013-07-16 16:07:45 +0000
3+++ lava_dispatcher/config.py 2013-07-22 21:32:25 +0000
4@@ -308,8 +308,9 @@
5 devices_dir = os.path.join(config_dir, 'devices')
6 if os.path.isdir(devices_dir):
7 for d in os.listdir(devices_dir):
8- d = os.path.splitext(d)[0]
9- devices.append(get_device_config(d))
10+ if d.endswith('.conf'):
11+ d = os.path.splitext(d)[0]
12+ devices.append(get_device_config(d))
13 return devices
14
15

Subscribers

People subscribed via source and target branches