Exemple #1
0
 def get_groups(self):
     try:
         with self.open('/etc/group', 'r') as source:
             return util.parse_groups(
                 [line.rstrip('\n') for line in source])
     except OSError as err:
         raise error.ExecError("Reading /etc/group failed.")
Exemple #2
0
    def guest_get_groups(self):
        """get groups from image

        Parse `/etc/group` of the used image

        Returns:
            List of groups
        """
        content = self.guest().cat('/etc/group').split("\n")
        return util.parse_groups(content)
Exemple #3
0
    def guest_get_groups(self):
        """get groups from image

        Parse `/etc/group` of the used image

        Returns:
            List of groups
        """
        content = self.guest().cat('/etc/group').split("\n")
        return util.parse_groups(content)
Exemple #4
0
Fichier : local.py Projet : xii/xii
 def get_groups(self):
     try:
         with self.open('/etc/group', 'r') as source:
             return util.parse_groups([line.rstrip('\n') for line in source])
     except OSError:
         raise error.ExecError("Reading /etc/group failed.")
Exemple #5
0
 def guest_get_groups(self):
     content = self.guest().cat('/etc/group').split("\n")
     return util.parse_groups(content)
Exemple #6
0
Fichier : ssh.py Projet : xii/xii
 def get_groups(self):
     with self.open("/etc/group") as source:
         return util.parse_groups([line.rstrip('\n') for line in source])