mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 22:00:27 +08:00
Sleep for n seconds before calling Wget Executable
This commit adds support for a new Environment Variable, SERVER_WAIT which if set will cause the script to sleep for SERVER_WAIT seconds before calling the wget executable. During this period, the custom HTTP/HTTPS/FTP servers are all set up and running and can be used for any other purposes. This feature is often used when a separate executable must be used for testing apart from the one at src/wget
This commit is contained in:
parent
7effa90359
commit
b828a6e4a7
@ -1,3 +1,8 @@
|
||||
2014-01-02 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* WgetTest.py (CommonMentods.exec_wget): Wait for n seconds before calling
|
||||
the Wget executable.
|
||||
|
||||
2013-12-27 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* WgetTest.py: Add modeline
|
||||
|
@ -5,6 +5,7 @@ import sys
|
||||
import traceback
|
||||
import HTTPServer
|
||||
import re
|
||||
import time
|
||||
from subprocess import call
|
||||
from ColourTerm import printer
|
||||
from difflib import unified_diff
|
||||
@ -40,6 +41,8 @@ class CommonMethods:
|
||||
cmd_line = self.get_cmd_line (options, urls, domain_list)
|
||||
params = shlex.split (cmd_line)
|
||||
print (params)
|
||||
if os.getenv ("SERVER_WAIT"):
|
||||
time.sleep (float (os.getenv ("SERVER_WAIT")))
|
||||
try:
|
||||
retcode = call (params)
|
||||
except FileNotFoundError as filenotfound:
|
||||
|
Loading…
Reference in New Issue
Block a user