[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 75a711dd713a90b74f0c0e372a20287ed3ace747

X2Go dev team git-admin at x2go.org
Sun May 19 13:04:40 CEST 2013


The branch, build-main has been updated
       via  75a711dd713a90b74f0c0e372a20287ed3ace747 (commit)
      from  e313c67ec94b6e86cd7de7623e9a538db739cedf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2gobroker/nameservices/libnss_nameservice.py |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/x2gobroker/nameservices/libnss_nameservice.py b/x2gobroker/nameservices/libnss_nameservice.py
index 5f11f4c..bb4f623 100644
--- a/x2gobroker/nameservices/libnss_nameservice.py
+++ b/x2gobroker/nameservices/libnss_nameservice.py
@@ -25,18 +25,20 @@ import grp
 # Python X2GoBroker modules
 import base_nameservice as base
 
+_pwd = pwd.getpwall()
+_grp = grp.getgrall()
 
 class X2GoBrokerNameService(base.X2GoBrokerNameService):
 
     def get_users(self):
-        return [ unicode(p.pw_name) for p in pwd.getpwall() ]
+        return [ unicode(p.pw_name) for p in _pwd ]
 
     def get_primary_group(self, username):
-        prim_gid_number = [ p.pw_gid for p in pwd.getpwall() if unicode(p.pw_name) == unicode(username) ][0]
-        return [ unicode(g.gr_name) for g in grp.getgrall() if g.gr_gid == prim_gid_number ][0]
+        prim_gid_number = [ p.pw_gid for p in _pwd if unicode(p.pw_name) == unicode(username) ][0]
+        return [ unicode(g.gr_name) for g in _grp if g.gr_gid == prim_gid_number ][0]
 
     def get_groups(self):
-        return [ unicode(g.gr_name) for g in grp.getgrall() ]
+        return [ unicode(g.gr_name) for g in _grp ]
 
     def get_group_members(self, group, primary_groups=False):
         _members_from_primgroups = []


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list