forked from apache/buildstream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'valentindavid/netrc' into 'master'
Add support for .netrc in remote/tar/zip plugins Closes apache#723 See merge request BuildStream/buildstream!908
- Loading branch information
Showing
9 changed files
with
431 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ pytest-pep8 | |
pytest-pylint | ||
pytest-xdist | ||
pytest-timeout | ||
pyftpdlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from contextlib import contextmanager | ||
|
||
from .ftp_server import SimpleFtpServer | ||
from .http_server import SimpleHttpServer | ||
|
||
|
||
@contextmanager | ||
def create_file_server(file_server_type): | ||
if file_server_type == 'FTP': | ||
server = SimpleFtpServer() | ||
elif file_server_type == 'HTTP': | ||
server = SimpleHttpServer() | ||
else: | ||
assert False | ||
|
||
try: | ||
yield server | ||
finally: | ||
server.stop() |
Oops, something went wrong.