[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:39:20 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 46f3c49e0d7ff122a3484f107ac3dffaa6a2b61c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 17 00:40:10 2009 +0000

    2009-12-16  Eric Seidel  <eric at webkit.org>
    
            Reviewed by David Levin.
    
            bugzilla-tool should not require users to install mechanize
            https://bugs.webkit.org/show_bug.cgi?id=32635
    
            Centralize our import logic.
    
            * Scripts/modules/bugzilla.py: use webkit_mechanize
            * Scripts/modules/statusbot.py: use webkit_mechanize
            * Scripts/modules/webkit_mechanize.py: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index adb1b96..7dc2a1a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,18 @@
 2009-12-16  Eric Seidel  <eric at webkit.org>
 
+        Reviewed by David Levin.
+
+        bugzilla-tool should not require users to install mechanize
+        https://bugs.webkit.org/show_bug.cgi?id=32635
+
+        Centralize our import logic.
+
+        * Scripts/modules/bugzilla.py: use webkit_mechanize
+        * Scripts/modules/statusbot.py: use webkit_mechanize
+        * Scripts/modules/webkit_mechanize.py: Added.
+
+2009-12-16  Eric Seidel  <eric at webkit.org>
+
         Reviewed by Adam Barth.
 
         Generalize commit-queue recent status page for all queues
diff --git a/WebKitTools/Scripts/modules/bugzilla.py b/WebKitTools/Scripts/modules/bugzilla.py
index a5673aa..b306483 100644
--- a/WebKitTools/Scripts/modules/bugzilla.py
+++ b/WebKitTools/Scripts/modules/bugzilla.py
@@ -44,19 +44,7 @@ from modules.credentials import Credentials
 # so this import should always succeed.
 from .BeautifulSoup import BeautifulSoup, SoupStrainer
 
-try:
-    from mechanize import Browser
-except ImportError, e:
-    print """
-mechanize is required.
-
-To install:
-sudo easy_install mechanize
-
-Or from the web:
-http://wwwsearch.sourceforge.net/mechanize/
-"""
-    exit(1)
+from modules.webkit_mechanize import Browser
 
 def parse_bug_id(message):
     match = re.search("http\://webkit\.org/b/(?P<bug_id>\d+)", message)
diff --git a/WebKitTools/Scripts/modules/statusbot.py b/WebKitTools/Scripts/modules/statusbot.py
index 3899d53..5f2dde8 100644
--- a/WebKitTools/Scripts/modules/statusbot.py
+++ b/WebKitTools/Scripts/modules/statusbot.py
@@ -29,25 +29,12 @@
 # WebKit's Python module for interacting with the Commit Queue status page.
 
 from modules.logging import log
+from modules.webkit_mechanize import Browser
 
 # WebKit includes a built copy of BeautifulSoup in Scripts/modules
 # so this import should always succeed.
 from .BeautifulSoup import BeautifulSoup
 
-try:
-    from mechanize import Browser
-except ImportError, e:
-    print """
-mechanize is required.
-
-To install:
-sudo easy_install mechanize
-
-Or from the web:
-http://wwwsearch.sourceforge.net/mechanize/
-"""
-    exit(1)
-
 import urllib2
 
 
diff --git a/WebKitTools/Scripts/modules/webkit_mechanize.py b/WebKitTools/Scripts/modules/webkit_mechanize.py
new file mode 100644
index 0000000..5d2d239
--- /dev/null
+++ b/WebKitTools/Scripts/modules/webkit_mechanize.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# 
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# A python shim for importing mechanize.
+
+# FIXME: We should try to download a copy instead of requiring root access.
+try:
+    from mechanize import Browser
+except ImportError, e:
+    print """
+mechanize is required.
+
+To install:
+sudo easy_install mechanize
+
+Or from the web:
+http://wwwsearch.sourceforge.net/mechanize/
+"""
+    exit(1)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list