diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2016-04-13 11:07:13 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2016-04-13 14:17:31 -0500 |
commit | ef759ed5db4c23c1969d4f127ac03f28a398337a (patch) | |
tree | 8fa957b666c57adcfb1d494c3e86fa3e63cc509c /pbr/packaging.py | |
parent | d4e29cb5d23e2bd1cf1b8a6b166b034279c764d7 (diff) | |
download | pbr-ef759ed5db4c23c1969d4f127ac03f28a398337a.tar.gz |
Correct server test
This test was relying on the short sleep allowing the subprocess
time to write to an external file. Rather than write to an
external file, have the output go to a pipe that the test process
can read so that the test doesn't have to guess how long to sleep.
Change-Id: I128a9dc5c7525d941f6e00c0073d983eab1e44e6
Diffstat (limited to 'pbr/packaging.py')
-rw-r--r-- | pbr/packaging.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index b78b4d9..b42afab 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -259,6 +259,7 @@ from %(module_name)s import %(import_target)s if __name__ == "__main__": import argparse import socket + import sys import wsgiref.simple_server as wss my_ip = socket.gethostbyname(socket.gethostname()) @@ -276,6 +277,7 @@ if __name__ == "__main__": print("Available at %%s" %% url) print("DANGER! For testing only, do not use in production") print("*" * 80) + sys.stdout.flush() server.serve_forever() else: |