#
##
import os, subprocess
-import urllib.request, urllib.error, urllib.parse, urllib.parse
+import urllib, urlparse
import SCons.Errors
Import('env')
try :
print(("Download %s from %s" % (target, url)))
print("Downloading ...")
- stream = urllib.request.urlopen(url)
+ stream = urllib.urlopen(url)
file = open(target, 'wb')
file.write(stream.read())
file.close()
# enables Scons warning for this builder
-class UnpackWarning(SCons.Warnings.SConsWarning) :
+class UnpackWarning(SCons.Warnings.Warning) :
pass
SCons.Warnings.enableWarningClass(UnpackWarning)
/* We'll want to provide some sort of explicit hook for custom logging at some
point; until then, this should do nicely (note that since these are lambdas,
later a special target could be captured, allowing much flexibility): */
- auto oclog_target = []() -> log_target_t&
+ inline auto oclog_target = []() -> log_target_t&
{
static OC::oc_log_stream ols(oc_make_ostream_logger);
static log_target_t os(ols);
};
} // namespace OC::detail
- auto oclog = []() -> boost::iostreams::stream<OC::oc_log_stream>&
+ inline auto oclog = []() -> boost::iostreams::stream<OC::oc_log_stream>&
{
return detail::oclog_target();
};