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 ...@@ -17,8 +17,6 @@ import hashlib
import os import os
import posixpath import posixpath
import re import re
import urllib
import urlparse
try: try:
from slapos.libnetworkcache import NetworkcacheClient, UploadError, \ from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
...@@ -113,7 +111,7 @@ def upload_network_cached(dir_url, cache_url, external_url, path, logger): ...@@ -113,7 +111,7 @@ def upload_network_cached(dir_url, cache_url, external_url, path, logger):
try: try:
nc = NetworkcacheClient(shacache=cache_url, nc = NetworkcacheClient(shacache=cache_url,
shadir=dir_url) shadir=dir_url)
data = nc.upload(f, directory_key, **kw) return nc.upload(f, directory_key, **kw)
except (IOError, UploadError), e: except (IOError, UploadError), e:
logger.info('Fail to upload file. %s' % \ logger.info('Fail to upload file. %s' % \
(str(e))) (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