Commit 1d49d415 authored by Łukasz Nowak's avatar Łukasz Nowak

Return status of called method.

Also remove not needed imports.
parent 412166d1
......@@ -17,8 +17,6 @@ import hashlib
import os
import posixpath
import re
import urllib
import urlparse
try:
from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
......@@ -113,7 +111,7 @@ def upload_network_cached(dir_url, cache_url, external_url, path, logger):
try:
nc = NetworkcacheClient(shacache=cache_url,
shadir=dir_url)
data = nc.upload(f, directory_key, **kw)
return nc.upload(f, directory_key, **kw)
except (IOError, UploadError), e:
logger.info('Fail to upload file. %s' % \
(str(e)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment