[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
dbates at webkit.org
dbates at webkit.org
Wed Jan 6 00:11:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d4b76e8d77b6b5fcfe57c200d0f0d7018b046847
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 30 06:04:15 2009 +0000
2009-12-29 Daniel Bates <dbates at webkit.org>
Reviewed by Adam Barth.
https://bugs.webkit.org/show_bug.cgi?id=33039
[bzt] Fixes an issue where bugzilla-tool dies when the keychain lookup
fails to find an entry for bugs.webkit.org.
Under Mac OS X, bugzilla-tool tries to query the keychain and Security
framework (via /usr/sbin/security) for an internet-password entry for
bugs.webkit.org so that it can use it to login to bugs.webkit.org.
However, if no such entry exists then bugzilla-tool dies with an error.
* Scripts/modules/credentials.py: Modified method _parse_security_tool_output to return
[None, None] if /usr/sbin/security cannot find keychain entry for bugs.webkit.org.
* Scripts/modules/credentials_unittest.py: Added method test_security_output_parse_entry_not_found.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index b2a0b6f..4042655 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-29 Daniel Bates <dbates at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33039
+
+ [bzt] Fixes an issue where bugzilla-tool dies when the keychain lookup
+ fails to find an entry for bugs.webkit.org.
+
+ Under Mac OS X, bugzilla-tool tries to query the keychain and Security
+ framework (via /usr/sbin/security) for an internet-password entry for
+ bugs.webkit.org so that it can use it to login to bugs.webkit.org.
+ However, if no such entry exists then bugzilla-tool dies with an error.
+
+ * Scripts/modules/credentials.py: Modified method _parse_security_tool_output to return
+ [None, None] if /usr/sbin/security cannot find keychain entry for bugs.webkit.org.
+ * Scripts/modules/credentials_unittest.py: Added method test_security_output_parse_entry_not_found.
+
2009-12-29 Eric Seidel <eric at webkit.org>
Rubber-stamped by Adam Barth.
diff --git a/WebKitTools/Scripts/modules/credentials.py b/WebKitTools/Scripts/modules/credentials.py
index 55ac11a..fc73c90 100644
--- a/WebKitTools/Scripts/modules/credentials.py
+++ b/WebKitTools/Scripts/modules/credentials.py
@@ -39,6 +39,8 @@ from modules.logging import log
from modules.scm import Git
class Credentials(object):
+ keychain_entry_not_found = "security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain."
+
def __init__(self, host, git_prefix=None, executive=None, cwd=os.getcwd()):
self.host = host
self.git_prefix = git_prefix
@@ -61,6 +63,8 @@ class Credentials(object):
return platform.mac_ver()[0]
def _parse_security_tool_output(self, security_output):
+ if security_output == self.keychain_entry_not_found:
+ return [None, None]
username = self._keychain_value_with_label("^\s*\"acct\"<blob>=", security_output)
password = self._keychain_value_with_label("^password: ", security_output)
return [username, password]
diff --git a/WebKitTools/Scripts/modules/credentials_unittest.py b/WebKitTools/Scripts/modules/credentials_unittest.py
index e8d4f7e..6736d0e 100644
--- a/WebKitTools/Scripts/modules/credentials_unittest.py
+++ b/WebKitTools/Scripts/modules/credentials_unittest.py
@@ -72,6 +72,10 @@ password: "SECRETSAUCE"
credentials = Credentials("bugs.webkit.org")
self.assertEqual(credentials._parse_security_tool_output(self.example_security_output), ["test at webkit.org", "SECRETSAUCE"])
+ def test_security_output_parse_entry_not_found(self):
+ credentials = Credentials("foo.example.com")
+ self.assertEqual(credentials._parse_security_tool_output(Credentials.keychain_entry_not_found), [None, None])
+
def _assert_security_call(self, username=None):
executive_mock = Mock()
credentials = Credentials("example.com", executive=executive_mock)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list