Changeset 8515 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 25 May 2012, 01:39:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r8511 r8515 680 680 return 681 681 682 @action(_('Add session configuration'), validator=NullValidator, style='primary') 682 @action(_('Add session configuration'), validator=NullValidator, 683 style='primary') 683 684 def addSubunit(self, **data): 684 685 self.redirect(self.url(self.context, '@@add')) … … 691 692 url = self.url(val) 692 693 session_string = val.getSessionString() 693 title = _('Session ${a} Configuration', mapping = {'a':session_string}) 694 title = _('Session ${a} Configuration', 695 mapping = {'a':session_string}) 694 696 yield(dict(url=url, name=key, title=title)) 695 697 … … 1244 1246 if search is None or not query: 1245 1247 return 1246 self.files = self.context.getLogFiles()1247 fullpath = os.path.join(self.context.storage, 'logs', logname)1248 1248 self.query = query 1249 #self.filecontents = open(fullpath, 'rb').read() 1250 popen = os.popen("grep '%s' %s" % (query,fullpath)) 1251 self.grepresult = popen.read() 1252 popen.close() 1249 try: 1250 self.grepresult = ''.join( 1251 self.context.queryLogfiles(logname, query)) 1252 except ValueError: 1253 self.flash(_('Not a valid search expression.' )) 1254 return 1253 1255 1254 1256 class DatacenterSettings(KofaPage):
Note: See TracChangeset for help on using the changeset viewer.