Ticket #34: env.py.diff

File env.py.diff, 1012 bytes (added by piotrm@…, 14 years ago)
  • trac/env.py

    old new  
    426426        if not self._href:
    427427            self._href = Href(urlsplit(self.abs_href.base)[2])
    428428        return self._href
    429     href = property(_get_href, 'The application root path')
     429    def _set_href(self, href):
     430        if href:
     431            self._href = href
     432           
     433    href = property(_get_href, _set_href, 'The application root path')
    430434
    431435    def _get_abs_href(self):
    432436        if not self._abs_href:
     
    437441            else:
    438442                self._abs_href = Href(self.base_url)
    439443        return self._abs_href
    440     abs_href = property(_get_abs_href, 'The application URL')
     444    def _set_abs_href(self, href):
     445        if href:
     446            self._abs_href = href
     447           
     448    abs_href = property(_get_abs_href, _set_abs_href, 'The application URL')
    441449
    442450
    443451class EnvironmentSetup(Component):