Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 4
0
    def read_credentials(self):
        username = None
        password = None

        try:
            if Git.in_working_directory(self.cwd):
                (username, password) = self._credentials_from_git()
        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
Exemplo n.º 5
0
    def read_credentials(self):
        username = None
        password = None

        try:
            if Git.in_working_directory(self.cwd):
                (username, password) = self._credentials_from_git()
        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
Exemplo n.º 6
0
 def _credentials_from_git(self):
     return [Git.read_git_config(self.git_prefix + "username"),
             Git.read_git_config(self.git_prefix + "password")]
Exemplo n.º 7
0
 def _credentials_from_git(self):
     return [
         Git.read_git_config(self.git_prefix + "username"),
         Git.read_git_config(self.git_prefix + "password")
     ]