Skip to content

Commit

Permalink
Refs #338. Make --show-values awared of --retype.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.nexusformat.org/code/trunk@1866 ff5d1e40-2be0-497f-93bd-dc18237bd3c7
  • Loading branch information
Marie Yao authored and Marie committed Dec 27, 2012
1 parent 50c0100 commit 52e6da7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions applications/nxdiff
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class Diff:
except KeyError:
right = None
try:
rightpath = kwargs["rightpath"]
self.rightpath = kwargs["rightpath"]
except KeyError:
rightpath = None
self.rightpath = None
try:
epsilon = kwargs["epsilon"]
except KeyError:
Expand All @@ -84,7 +84,7 @@ class Diff:
if self.summary != Diff.UNKNOWN:
return

self.__cmpData(left, right, rightpath, epsilon)
self.__cmpData(left, right, self.rightpath, epsilon)
if len(self.details) > 0:
self.summary = Diff.DIFF
else:
Expand All @@ -104,7 +104,7 @@ class Diff:

def __cmpData(self, left, right, rightpath, epsilon):
left = left.getData(self.path)
if rightpath != None:
if rightpath is not None:
right = right.getData(rightpath)
else:
right = right.getData(self.path)
Expand Down Expand Up @@ -478,7 +478,11 @@ def printDataDiff(left, right, diff, **kwargs):

# get the data
left = left.getData(diff.path)
right = right.getData(diff.path)
# use diff.rightpath for --retype
if diff.rightpath is not None:
right = right.getData(diff.rightpath)
else:
right = right.getData(diff.path)

# the dimensions of the data
leftLength = 1
Expand Down

0 comments on commit 52e6da7

Please sign in to comment.