]> git.nothing2do.fr Git - get-hack-src.git/commitdiff
Fixed settings directory detection by excluding the minor update dirs
authorallfro <ndouba@gmail.com>
Mon, 22 Oct 2012 11:03:47 +0000 (07:03 -0400)
committerallfro <ndouba@gmail.com>
Mon, 22 Oct 2012 11:03:47 +0000 (07:03 -0400)
src/canari/commands/common.py

index 3ffd126c86c18d4f6a00eeb3c89d6f4461a852aa..13568e8da14bf24f676785b1bcd5ea7206fb898f 100644 (file)
@@ -31,7 +31,7 @@ def get_commands(module='canari.commands'):
 
 
 def _detect_settings_dir(d):
-    vs = [ i for i in listdir(d) if path.isdir(sep.join([d, i])) ]
+    vs = [ i for i in listdir(d) if path.isdir(sep.join([d, i])) if path.isdir(sep.join([d, i, 'config']))]
     if len(vs) == 1:
         return sep.join([d, vs[0]])
     else: