Remove special formatting function

This commit is contained in:
Joscha 2016-05-23 16:22:47 +02:00
parent c075287222
commit fdfb7cb7f1

View file

@ -61,27 +61,6 @@ class Session():
return "".join(c for c in self.name if not c in ",.!?;&<'\"" and not c.isspace()).lower() return "".join(c for c in self.name if not c in ",.!?;&<'\"" and not c.isspace()).lower()
def listable(self, width):
"""
listable(width): -> prefixes, name
Prefixes and name which together are <width> characters long or shorter.
"""
prefixes = ""
if self.session_type() == "account":
prefixes += "*"
if self.is_manager():
prefixes += "m"
if self.is_staff():
prefixes += "s"
name = self.name()
if len(prefixes + name) > width:
name = name[:width - len(prefixes) - 1] + ""
return prefixes, name
def is_staff(self): def is_staff(self):
""" """
is_staff() -> bool is_staff() -> bool