Skip to content

Commit

Permalink
test: Fix expectations on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 18, 2024
1 parent aa60da5 commit 7b539ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion integration_tests/test_webservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_delversion_nonexistent_project():
f"[Errno 2] No such file or directory: '{BASEDIR}/eggs/nonexistent/noegg.egg'"
if sys.platform != "win32" else
"[WinError 3] The system cannot find the path specified: "
f"{BASEDIR}\\\\eggs\\\\nonexistent\\\\noegg.egg'"
f"'{BASEDIR}\\\\eggs\\\\nonexistent\\\\noegg.egg'"
),
},
data={"project": "nonexistent", "version": "noegg"},
Expand Down
2 changes: 2 additions & 0 deletions scrapyd/webservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ def render_POST(self, txrequest, project):
UtilsCache.invalid_cache(project)
return {"node_name": self.root.nodename, "status": "ok"}

# Minor security note: Submitting a non-existent project or version when using the default eggstorage can produce
# an error message that discloses the resolved path to the eggs_dir.
def _delete_version(self, project, version=None):
self.root.eggstorage.delete(project, version)
self.root.update_projects()
Expand Down

0 comments on commit 7b539ae

Please sign in to comment.