Ejemplo n.º 1
0
 def human_id(self):
     """Subclasses may override this provide a pretty ID which can be used
     for bash completion.
     """
     if self.NAME_ATTR in self.__dict__ and self.HUMAN_ID:
         return strutils.to_slug(getattr(self, self.NAME_ATTR))
     return None
Ejemplo n.º 2
0
 def human_id(self):
     """Human-readable ID which can be used for bash completion.
     """
     if self.HUMAN_ID:
         name = getattr(self, self.NAME_ATTR, None)
         if name is not None:
             return strutils.to_slug(name)
     return None
Ejemplo n.º 3
0
 def human_id(self):
     """Human-readable ID which can be used for bash completion.
     """
     if self.HUMAN_ID:
         name = getattr(self, self.NAME_ATTR, None)
         if name is not None:
             return strutils.to_slug(name)
     return None
Ejemplo n.º 4
0
 def human_id(self):
     """Human-readable ID which can be used for bash completion.
     """
     if self.NAME_ATTR in self.__dict__ and self.HUMAN_ID:
         return strutils.to_slug(getattr(self, self.NAME_ATTR))
     return None
Ejemplo n.º 5
0
 def human_id(self):
     """Human-readable ID which can be used for bash completion.
     """
     if self.NAME_ATTR in self.__dict__ and self.HUMAN_ID:
         return strutils.to_slug(getattr(self, self.NAME_ATTR))
     return None