示例#1
0
 def _credentials_from_git(self):
     try:
         if not Git.in_working_directory(self.cwd):
             return (None, None)
         return (Git.read_git_config(self.git_prefix + "username"),
                 Git.read_git_config(self.git_prefix + "password"))
     except OSError, e:
         # Catch and ignore OSError exceptions such as "no such file
         # or directory" (OSError errno 2), which imply that the Git
         # command cannot be found/is not installed.
         pass
示例#2
0
 def _credentials_from_git(self):
     try:
         if not Git.in_working_directory(self.cwd):
             return (None, None)
         return (Git.read_git_config(self.git_prefix + "username"),
                 Git.read_git_config(self.git_prefix + "password"))
     except OSError, e:
         # Catch and ignore OSError exceptions such as "no such file
         # or directory" (OSError errno 2), which imply that the Git
         # command cannot be found/is not installed.
         pass
示例#3
0
 def _status_server_api_key_from_git():
     try:
         if not Git.in_working_directory(os.getcwd()):
             return None
         return Git.read_git_config('webkit.status-api-key')
     except OSError as e:
         # Catch and ignore OSError exceptions such as "no such file
         # or directory" (OSError errno 2), which imply that the Git
         # command cannot be found/is not installed.
         _log.warning('Could not read API key from Git: {}'.format(str(e)))
     return None
示例#4
0
 def _credentials_from_git(self):
     return [Git.read_git_config(self.git_prefix + "username"),
             Git.read_git_config(self.git_prefix + "password")]
示例#5
0
 def _credentials_from_git(self):
     return [
         Git.read_git_config(self.git_prefix + "username"),
         Git.read_git_config(self.git_prefix + "password")
     ]