Brad Crittenden has proposed merging lp:~bac/launchpad/bug-803935 into lp:launchpad.
Requested reviews: Launchpad code reviewers (launchpad-reviewers) Related bugs: Bug #803035 in mantid: "Get Andrei to do some work" https://bugs.launchpad.net/mantid/+bug/803035 Bug #803935 in Launchpad itself: "oops.pt references JS files incorrectly" https://bugs.launchpad.net/launchpad/+bug/803935 For more details, see: https://code.launchpad.net/~bac/launchpad/bug-803935/+merge/66495 = Summary = For some reason oops.pt was not using base layout and was using an obsolete path to CSS and JS assets. Also did drive-by fix to avoid using the deprecated BaseException.message attribute. == Proposed fix == Convert to use base layout. == Pre-implementation notes == Talk with Curtis. == Implementation details == As above. == Tests == == Demo and Q/A == = Launchpad lint = Will fix before landing. Checking for conflicts and issues in changed files. Linting changed files: lib/lp/app/templates/oops.pt lib/lp/app/widgets/date.py lib/lp/app/widgets/tests/test_datetime.py ./lib/lp/app/widgets/date.py 122: E303 too many blank lines (2) 153: E111 indentation is not a multiple of four ./lib/lp/app/widgets/tests/test_datetime.py 11: E302 expected 2 blank lines, found 1 -- https://code.launchpad.net/~bac/launchpad/bug-803935/+merge/66495 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-803935 into lp:launchpad.
=== modified file 'lib/lp/app/templates/oops.pt' --- lib/lp/app/templates/oops.pt 2011-05-27 20:26:32 +0000 +++ lib/lp/app/templates/oops.pt 2011-06-30 16:51:03 +0000 @@ -1,22 +1,15 @@ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal" - xml:lang="en" - lang="en" + xmlns:metal="http://xml.zope.org/namespaces/metal" + xmlns:i18n="http://xml.zope.org/namespaces/i18n" + metal:use-macro="view/macro:page/locationless" + i18n:domain="launchpad" > - <head> - <title>Oops!</title> - <style type="text/css" media="screen, print"> - @import url(/+icing/rev5/combo.css); - </style> - <script type="text/javascript" - tal:content="string:var cookie_scope = '${request/lp:cookie_scope}';"></script> - <script type="text/javascript" src="/+icing/rev5/build/lp/lp.js"></script> - </head> <body> - <div class="yui-d0"> - - <div id="maincontent"> + <div class="top-portlet" metal:fill-slot="main"> + + <h1 class="exception">Oops!</h1> <p> Sorry, something just went wrong in Launchpad. @@ -41,8 +34,6 @@ </li> </ul> </div> - </div> </div> - </body> </html> === modified file 'lib/lp/app/widgets/date.py' --- lib/lp/app/widgets/date.py 2011-02-24 15:30:54 +0000 +++ lib/lp/app/widgets/date.py 2011-06-30 16:51:03 +0000 @@ -117,7 +117,7 @@ """ timeformat = '%Y-%m-%d %H:%M:%S' - + required_time_zone = None display_zone = True @@ -343,7 +343,7 @@ try: datetime.strptime(input.strip(), fmt) except (ValueError), e: - if 'unconverted data remains' in e.message: + if 'unconverted data remains' in str(e): return else: failure = e === modified file 'lib/lp/app/widgets/tests/test_datetime.py' --- lib/lp/app/widgets/tests/test_datetime.py 2011-02-18 23:45:36 +0000 +++ lib/lp/app/widgets/tests/test_datetime.py 2011-06-30 16:51:03 +0000 @@ -16,7 +16,7 @@ super(TestDateTimeWidget, self).setUp() field = Field(__name__='foo', title=u'Foo') request = LaunchpadTestRequest() - self.widget = DateTimeWidget(field, request) + self.widget = DateTimeWidget(field, request) def test_unsupported_format_errors(self): # Dates in unsupported formats result in a ConversionError @@ -33,7 +33,7 @@ try: datetime.strptime(test_str, fmt) except (ValueError,), e: - self.assertTrue('unconverted data' in e.message) + self.assertTrue('unconverted data' in str(e)) def test_whitespace_does_not_trick_validation(self): # Trailing whitespace doesn't get through because of the
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

