Ejemplo n.º 1
0
 def init(self):
     SchoolBaseModule.init(self)
     ComputerSanitizer.instance = self
     self._italc = ITALC_Manager()
     self._random = Random()
     self._random.seed()
     self._lessons = SchoolLessons()
     self._ruleEndAt = None
     self._load_plugins()
Ejemplo n.º 2
0
 def init(self):
     global CUPSPDF_DIR, CUPSPDF_USERSUBDIR
     SchoolBaseModule.init(self)
     CUPSPDF_DIR, CUPSPDF_USERSUBDIR = os.path.normpath(
         ucr.get('cups/cups-pdf/directory',
                 '/var/spool/cups-pdf/%U')).split('%U')
     # create directory if it does not exist
     try:
         if not os.path.exists(CUPSPDF_DIR):
             os.makedirs(DISTRIBUTION_DATA_PATH, 0o755)
     except (OSError, IOError) as exc:
         MODULE.error('error occured while creating %s: %s' %
                      (CUPSPDF_DIR, exc))
     self.fqdn = '%s.%s' % (ucr.get('hostname'), ucr.get('domainname'))
     self.pw_callback_bad_password = False
Ejemplo n.º 3
0
 def init(self):
     SchoolBaseModule.init(self)
     self._lessons = SchoolLessons()
Ejemplo n.º 4
0
 def init(self):
     SchoolBaseModule.init(self)
     # initiate paths for data distribution
     util.distribution.initPaths()