Skip to content

Commit 3728f98

Browse files
committed
Update groupNames.py
Same as with userNames.py (e31d0cd): 1) 'has_key()' has been removed in Python 3.x 2) This works if we use the grent.* values instead of grp and gid
1 parent f4e27eb commit 3728f98

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/distro/groupNames.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313

1414
for grpent in grp.getgrall():
15-
if lsbGroups.has_key(grpent.gr_name):
15+
if grpent.gr_name in lsbGroups:
1616
if grpent.gr_gid != lsbGroups[grpent.gr_name]:
17-
print 'GID for group %s does not match specification' %grp
18-
print 'found: ', gid, ',', ' expected: ', lsbGroups[grp]
17+
print 'GID for group %s does not match specification' %grpent.gr_name
18+
print 'found: ', grpent.gr_gid, ',', ' expected: ', lsbGroups[grpent.gr_name]
1919
sys.exit(1)

0 commit comments

Comments
 (0)