Skip to content

Commit

Permalink
Fixed error with group import
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Perrin committed Feb 22, 2016
1 parent 8e3be1d commit f8cabbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ target/
build/

#Otto
.otto*
.otto*

.vagrant
5 changes: 3 additions & 2 deletions pammysqltools/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,9 @@ def importgroups(ignore_password, config, lower, upper):
if ignore_password:
gs[1] = '!'
gm.addgroup(g[0], gid=g[2], password=gs[1])
for user in g[3].split(','):
glm.addgroupuser(username=user, gid=g[2])
if g[3]:
for user in g[3].split(','):
glm.addgroupuser(username=user, gid=g[2])
dbs.commit()
dbs.close()

Expand Down

0 comments on commit f8cabbd

Please sign in to comment.