Skip to content

Commit

Permalink
warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencastan committed Jul 16, 2020
1 parent 82342a7 commit 91f5334
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
9 changes: 4 additions & 5 deletions meshroom/core/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def findNode(self, nodeExpr):
candidates = self.findNodeCandidates('^' + nodeExpr)
if not candidates:
raise KeyError('No node candidate for "{}"'.format(nodeExpr))
elif len(candidates) > 1:
if len(candidates) > 1:
raise KeyError('Multiple node candidates for "{}": {}'.format(nodeExpr, str([c.name for c in candidates])))
return candidates[0]

Expand Down Expand Up @@ -681,11 +681,11 @@ def _dfsVisit(self, u, visitor, colors, nodeChildren, longestPathFirst):
# (u,v) is a tree edge
self.dfsVisit(v, visitor, colors, nodeChildren, longestPathFirst) # TODO: avoid recursion
elif colors[v] == GRAY:
# (u,v) is a back edge
visitor.backEdge((u, v), self)
pass # (u,v) is a back edge
elif colors[v] == BLACK:
# (u,v) is a cross or forward edge
visitor.forwardOrCrossEdge((u, v), self)
pass # (u,v) is a cross or forward edge
visitor.finishEdge((u, v), self)
colors[u] = BLACK
visitor.finishVertex(u, self)
Expand Down Expand Up @@ -740,8 +740,7 @@ def finishVertex(vertex, graph):
def finishEdge(edge, graph):
if edge[0].hasStatus(Status.SUCCESS) or edge[1].hasStatus(Status.SUCCESS):
return
else:
edges.append(edge)
edges.append(edge)

visitor.finishVertex = finishVertex
visitor.finishEdge = finishEdge
Expand Down
2 changes: 1 addition & 1 deletion meshroom/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def _computeUids(self):

def _buildCmdVars(self):
def _buildAttributeCmdVars(cmdVars, name, attr):
if attr.attributeDesc.group != None:
if attr.attributeDesc.group is not None:
# if there is a valid command line "group"
v = attr.getValueStr()
cmdVars[name] = '--{name} {value}'.format(name=name, value=v)
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def buildIntrinsics(self, node, additionalViews=()):
os.makedirs(os.path.join(tmpCache, node.internalFolder))
self.createViewpointsFile(node, additionalViews)
cmd = self.buildCommandLine(node.chunks[0])
logging.debug(' - commandLine:', cmd)
logging.debug(' - commandLine: {}'.format(cmd))
proc = psutil.Popen(cmd, stdout=None, stderr=None, shell=True)
stdout, stderr = proc.communicate()
# proc.wait()
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def findMetadata(d, keys, defaultValue):
for key in keys:
v = d.get(key, None)
k = key.lower()
if v != None:
if v is not None:
return v
for dk, dv in d.iteritems():
dkm = dk.lower().replace(" ", "")
Expand Down
3 changes: 1 addition & 2 deletions meshroom/nodes/aliceVision/LdrToHdrMerge.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__version__ = "2.0"

import json
import os

from meshroom.core import desc

Expand All @@ -10,7 +9,7 @@ def findMetadata(d, keys, defaultValue):
for key in keys:
v = d.get(key, None)
k = key.lower()
if v != None:
if v is not None:
return v
for dk, dv in d.iteritems():
dkm = dk.lower().replace(" ", "")
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def findMetadata(d, keys, defaultValue):
for key in keys:
v = d.get(key, None)
k = key.lower()
if v != None:
if v is not None:
return v
for dk, dv in d.iteritems():
dkm = dk.lower().replace(" ", "")
Expand Down
3 changes: 0 additions & 3 deletions meshroom/nodes/aliceVision/StructureFromMotion.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
__version__ = "2.0"

import json
import os

from meshroom.core import desc


Expand Down

0 comments on commit 91f5334

Please sign in to comment.