Skip to content

Commit

Permalink
override username and password
Browse files Browse the repository at this point in the history
with SCRAPYD_USERNAME and SCRAPYD_PASSWORD
  • Loading branch information
fkromer committed Nov 29, 2023
1 parent 2bc5732 commit 36383ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scrapyd/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

def create_wrapped_resource(webcls, config, app):
username = config.get('username', '')
if os.environ.get("SCRAPYD_USERNAME"):
username = os.environ["SCRAPYD_USERNAME"]

Check warning on line 22 in scrapyd/app.py

View check run for this annotation

Codecov / codecov/patch

scrapyd/app.py#L22

Added line #L22 was not covered by tests
password = config.get('password', '')
if os.environ.get("SCRAPYD_PASSWORD"):
password = os.environ["SCRAPYD_PASSWORD"]

Check warning on line 25 in scrapyd/app.py

View check run for this annotation

Codecov / codecov/patch

scrapyd/app.py#L25

Added line #L25 was not covered by tests
if ':' in username:
sys.exit("The `username` option contains illegal character ':', "
"check and update the configuration file of Scrapyd")
Expand Down

0 comments on commit 36383ef

Please sign in to comment.