[tests] Workaround for saving_logs

This commit is contained in:
Nastya Urlapova 2013-09-25 12:04:50 +04:00
parent 86a07d6837
commit 6a5e716e33

View File

@ -24,10 +24,13 @@ from fuelweb_test.settings import LOGS_DIR
def save_logs(ip, filename):
logging.info('Saving logs to "%s" file' % filename)
with open(filename, 'w') as f:
f.write(
urllib2.urlopen("http://%s:8000/api/logs/package" % ip).read()
)
try:
with open(filename, 'w') as f:
f.write(
urllib2.urlopen("http://%s:8000/api/logs/package" % ip).read()
)
except urllib2.HTTPError, e:
logging.error(e)
def fetch_logs(func):