Skip to content

Commit 6532fec

Browse files
committed
reorder except and ignore statement check
reorder except and ignore statement check
1 parent e81e3a3 commit 6532fec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/src/xfd_django/xfd_api/api_methods/sync.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ async def sync_post(sync_body, request: Request, current_user):
4848

4949
except HTTPException as http_exc:
5050
raise http_exc
51-
except Exception as e:
52-
print(e)
53-
raise HTTPException(status_code=500, detail=str(e))
5451
except SyncError as sync_exc:
5552
raise HTTPException(
5653
status_code=500,
5754
detail=f"SyncError: {sync_exc.message} - {sync_exc.error_message}",
5855
)
56+
except Exception as e:
57+
print(e)
58+
raise HTTPException(status_code=500, detail=str(e))
5959

6060

6161
def process_request(headers, sync_body):

backend/src/xfd_django/xfd_api/tasks/vulnScanningSync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def fetch_in_chunks(base_query: str, chunk_size: int = 5000):
139139
offset += chunk_size
140140

141141

142-
def main():
142+
def main(): # pylint: disable=R0915
143143
"""Execute the vulnerability scanning synchronization task."""
144144
LOGGER.info("Started VulnScanningSync scan...")
145145

0 commit comments

Comments
 (0)