[Change Request] Fix transifex disablement to not traceback w/ search engines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Search engines are hitting the login page and tripping a traceback.  I'd
like to apply this patch to our hotfix from yesterday in order to fix that.
Issue reported here:

https://fedorahosted.org/fedora-infrastructure/ticket/2638

Can I get two +1's?

-Toshio
From 26a5cc3de7b397dfd00903ea2659b73b966f15c8 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Toshio=20=E3=81=8F=E3=82=89=E3=81=A8=E3=81=BF?= <toshio@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Feb 2011 17:09:49 +0000
Subject: [PATCH] Fix search engines hitting the login page and causing a traceback

---
 .../hotfix/files/transifex/tx-simpleauth-views.py  |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/hotfix/files/transifex/tx-simpleauth-views.py b/modules/hotfix/files/transifex/tx-simpleauth-views.py
index f38234c..d4ccb48 100644
--- a/modules/hotfix/files/transifex/tx-simpleauth-views.py
+++ b/modules/hotfix/files/transifex/tx-simpleauth-views.py
@@ -19,8 +19,11 @@ def logout(request, template_name='simpleauth/logged_out.html'):
 def login(request, template_name='simpleauth/signin.html'):
     """Login the user to the website and redirect back."""
     # Migration to fedora.transifex.net
-    request.user.message_set.create(
-        message=_("Login is disabled due to migration to fedora.transifex.net."))
+    try:
+        request.user.message_set.create(
+            message=_("Login is disabled due to migration to fedora.transifex.net."))
+     except:
+         pass
     return HttpResponseRedirect(reverse('transifex.home'))
 #    next = clean_next(request.GET.get('next'))
 #    # By default keep the user logged in for 3 weeks
-- 
1.5.5.6

Attachment: pgpousGIjl2B9.pgp
Description: PGP signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux