Skip to content
Snippets Groups Projects

Resolve "ERROR module X has no dependency declaration: __gradle_deps__"

4 files
+ 44
10
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -10,14 +10,24 @@ import shutil
class CbngWebResolver(object):
dependency_variable = '__cmmnbuild_deps__'
description = 'CBNG Web Service'
@classmethod
def is_available(cls):
# check if CBNG web service is reachable
try:
requests.get('http://bewww.cern.ch/ap/', timeout=1.0)
requests.get('http://bewww.cern.ch/ap/', timeout=5.0)
return True
except:
try:
import platform
hostname = platform.node()
if 'cern.ch' in hostname:
logging.warning(('This appears to be a CERN machine ({0}), but CBNG is not available. Will try ' +
'to resolve dependencies from public repositories, which may not work for ' +
'CERN internal modules.').format(hostname))
except:
pass
return False
def __init__(self, dependencies):
Loading