Beispiel #1
0
 def getMemberNames(self):
     members = []
     for project in self.projectdb.get_all(fields=['name', ]):
         project_name = utf8(project['name'])
         if not project_name.endswith('.py'):
             project_name += '.py'
         members.append(project_name)
     return members
Beispiel #2
0
 def _stringify(data):
     if 'result' in data:
         data['result'] = json.dumps(data['result'])
     if six.PY3:
         for key, value in list(six.iteritems(data)):
             if isinstance(value, six.string_types):
                 data[key] = utils.utf8(value)
     return data
Beispiel #3
0
 def _stringify(data):
     for each in ("schedule", "fetch", "process", "track"):
         if each in data:
             data[each] = json.dumps(data[each])
     if six.PY3:
         for key, value in list(six.iteritems(data)):
             if isinstance(value, six.string_types):
                 data[key] = utils.utf8(value)
     return data
Beispiel #4
0
 def getMemberList(self):
     members = []
     for project in self.projectdb.get_all():
         project_name = utf8(project['name'])
         if not project_name.endswith('.py'):
             project_name += '.py'
         members.append(ScriptResource(
             os.path.join(self.path, project_name),
             self.environ,
             self.app,
             project
         ))
     return members
Beispiel #5
0
 def _stringify(data):
     if six.PY3:
         for key, value in list(six.iteritems(data)):
             if isinstance(value, six.string_types):
                 data[key] = utils.utf8(value)
     return data
Beispiel #6
0
 def getContent(self):
     return BytesIO(utf8(self.project['script']))
Beispiel #7
0
 def getContentLength(self):
     return len(utf8(self.project['script']))