diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 639: get_devices: only use device config files that end with .conf

Message ID 20130723113131.19308.69129.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Antonio Terceiro July 23, 2013, 11:31 a.m. UTC
------------------------------------------------------------
revno: 639
committer: Antonio Terceiro <antonio.terceiro@linaro.org>
branch nick: trunk
timestamp: Mon 2013-07-22 18:18:32 -0300
message:
  get_devices: only use device config files that end with .conf
  
  This allows you to temporarily "disable" some device conf file by renaming it
  to foo01.conf.off for example.
modified:
  lava_dispatcher/config.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/config.py'
--- lava_dispatcher/config.py	2013-07-16 16:07:45 +0000
+++ lava_dispatcher/config.py	2013-07-22 21:18:32 +0000
@@ -308,8 +308,9 @@ 
         devices_dir = os.path.join(config_dir, 'devices')
         if os.path.isdir(devices_dir):
             for d in os.listdir(devices_dir):
-                d = os.path.splitext(d)[0]
-                devices.append(get_device_config(d))
+                if d.endswith('.conf'):
+                    d = os.path.splitext(d)[0]
+                    devices.append(get_device_config(d))
     return devices