File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ def authorization(self) -> Optional[Tuple[str, str]]:
9090 try :
9191 auth_store = netrc .netrc ()
9292 auth_tupple = auth_store .authenticators (self ._url .host )
93- except netrc .NetrcParseError as e :
94- print (str (e ), file = sys .stderr )
93+ except netrc .NetrcParseError as exc :
94+ print (str (exc ), file = sys .stderr )
9595 auth_tupple = None
9696 except FileNotFoundError :
9797 auth_tupple = None
@@ -137,7 +137,7 @@ def enabled(repo) -> bool:
137137 _url = repo .remotes ['origin' ].url
138138 url = urllib3 .util .parse_url (_url )
139139 result = url .hostname == 'github.com'
140- except Exception : # pylint: disable=broad-except
140+ except Exception : # nosec pylint: disable=broad-except
141141 pass
142142 LOG .debug ('github-api: enabled %s' , result )
143143 return result
@@ -218,7 +218,7 @@ def enabled(repo) -> bool:
218218 if repo .remotes :
219219 url = urllib3 .util .parse_url (repo .remotes ['origin' ].url )
220220 return url .hostname .startswith ('bitbucket' )
221- except Exception : # pylint: disable=broad-except
221+ except Exception : # nosec pylint: disable=broad-except
222222 pass
223223 return False
224224
Original file line number Diff line number Diff line change 2323import logging
2424import os
2525import os .path
26- import subprocess
26+ import subprocess # nosec
2727from typing import Dict , List , Set
2828
2929import xdg
@@ -140,11 +140,12 @@ def fetch_missing_data(commit: Commit, repo: Repository) -> bool:
140140 LOG .info ('Fetching missisng data for %s' , oid )
141141 LOG .debug ('Executing %s' , ' ' .join (cmd ))
142142 try :
143- subprocess .run (cmd ,
144- capture_output = False ,
145- stdout = subprocess .DEVNULL ,
146- stderr = subprocess .DEVNULL ,
147- check = True )
143+ subprocess .run ( # nosec
144+ cmd ,
145+ capture_output = False ,
146+ stdout = subprocess .DEVNULL ,
147+ stderr = subprocess .DEVNULL ,
148+ check = True )
148149 except subprocess .CalledProcessError :
149150 return False
150151 return True
You can’t perform that action at this time.
0 commit comments