Changeset 4909
- Timestamp:
- 27 Jan 2010, 13:17:38 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/browser/pages.py
r4898 r4909 562 562 563 563 if showlog is not None: 564 logfilename = " logs/datacenter.log" # % (self.filename, self.mode)564 logfilename = "datacenter.log" 565 565 session['logname'] = logfilename 566 566 self.redirect(self.url(self.context, '@@show')) … … 593 593 pnav = 0 594 594 595 def update(self, show=None, remove=None,logname=None, back=None):595 def update(self, show=None, logname=None, back=None): 596 596 session = ISession(self.request)['waeup.sirp'] 597 597 if back is not None: … … 600 600 if logname is not None: 601 601 session['logname'] = logname 602 if remove is not None:603 fullpath = os.path.join(self.context.storage, logname)604 try:605 os.unlink(fullpath)606 self.flash('File %s deleted.' % logname)607 except:608 self.flash("Could not delete %s: " % logname)609 self.flash("Problem: %s" % sys.exc_info()[1])610 611 602 if show is not None: 612 603 self.redirect(self.url(self.context, '@@show')) … … 630 621 self.filename = logname 631 622 self.files = self.context.getLogFiles() 632 fullpath = os.path.join(self.context.storage, logname)623 fullpath = os.path.join(self.context.storage, 'logs', logname) 633 624 self.filecontents = open(fullpath, 'rb').read() 634 625
Note: See TracChangeset for help on using the changeset viewer.