Skip to content

Commit

Permalink
Fix order in groups setting
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Feb 17, 2014
1 parent d67d7ff commit 3c532bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/dots
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ class Configuration(object):
def groups(self, groups):
"""Set the list of groups for this configuration"""
# Trim trailing and leading slashes
groups = set([x.strip('/') for x in groups])
groups = [x.strip('/') for x in groups]

# Warn for invalid groups
missing_groups = groups.difference(self.valid_groups)
missing_groups = set(groups).difference(self.valid_groups)

if missing_groups:
warnings.warn("Configuration group does not exist: {}".format(", ".join(missing_groups)), RuntimeWarning)

self._groups = list(groups.intersection(self.valid_groups))
self._groups = [x for x in groups if x in self.valid_groups]
return groups

def load_from_file(self):
Expand Down

0 comments on commit 3c532bf

Please sign in to comment.