Skip to content

Commit

Permalink
完善 django_scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
NewToolAI committed Dec 5, 2024
1 parent 805df8c commit 7f387b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docapi/scanner/django_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _get_settings(self, manager_path):

for line in manager_path.read_text(encoding='utf-8').splitlines():
if re.match(r'^os\.environ.*DJANGO_SETTINGS_MODULE', line.strip()):
settings = line.split('DJANGO_SETTINGS_MODULE')[-1].strip(",') ")
settings = line.split('DJANGO_SETTINGS_MODULE')[-1].strip(",')\"\t\n ")
return settings

raise RuntimeError('Cannot find DJANGO_SETTINGS_MODULE')
Expand Down

0 comments on commit 7f387b9

Please sign in to comment.