When link_type is not proximity or file the variables are not defined, but used later. Signed-off-by: Matthias Dittrich <matthi.d@xxxxxxxxx> --- codeface/cluster/cluster.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codeface/cluster/cluster.py b/codeface/cluster/cluster.py index 0139284..976c85c 100755 --- a/codeface/cluster/cluster.py +++ b/codeface/cluster/cluster.py @@ -1264,7 +1264,8 @@ def emitStatisticalData(cmtlist, id_mgr, logical_depends, outdir, releaseRangeID writeAdjMatrix2File(id_mgr, outdir, conf) - writeDependsToDB(logical_depends, fileCommitDict, cmtlist, releaseRangeID, dbm, conf) + if logical_depends is not None: + writeDependsToDB(logical_depends, fileCommitDict, cmtlist, releaseRangeID, dbm, conf) return None @@ -1650,6 +1651,8 @@ def performAnalysis(conf, dbm, dbfilename, git_repo, revrange, subsys_descr, if subsys_descr != None: id_mgr.setSubsysNames(subsys_descr.keys()) + logical_depends = None + fileCommitDict = git.getFileCommitDict() #--------------------------------- #compute network connections #--------------------------------- @@ -1665,8 +1668,6 @@ def performAnalysis(conf, dbm, dbfilename, git_repo, revrange, subsys_descr, else: startDate = None - fileCommitDict = git.getFileCommitDict() - logical_depends = None if link_type == LinkType.proximity: computeProximityLinks( fileCommitDict, cmtdict, id_mgr, link_type, startDate) -- 1.8.5.5