Skip to content

TEST/STY: Travis errors #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nibabel/benchmarks/bench_arrayproxy_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def testfunc():
data[:, 1] = [r[4] for r in results]
try:
data[:, 2] = [r[3] / r[4] for r in results]
except:
except ZeroDivisionError:
data[:, 2] = np.nan
data[:, 3] = [r[5] - r[6] for r in results]

Expand Down
12 changes: 6 additions & 6 deletions nibabel/ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,13 @@ def get_series_framenumbers(mlist):
mlist_nframes = len(frames_order)
trueframenumbers = np.arange(nframes - mlist_nframes, nframes)
frame_dict = {}
try:
for frame_stored, (true_order, _) in frames_order.items():
# frame as stored in file -> true number in series
for frame_stored, (true_order, _) in frames_order.items():
# frame as stored in file -> true number in series
try:
frame_dict[frame_stored] = trueframenumbers[true_order] + 1
return frame_dict
except:
raise IOError('Error in header or mlist order unknown')
except IndexError:
raise IOError('Error in header or mlist order unknown')
return frame_dict


def read_subheaders(fileobj, mlist, endianness):
Expand Down
2 changes: 1 addition & 1 deletion nibabel/tests/test_image_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ def validate_shape(self, imaker, params):

def validate_shape_deprecated(self, imaker, params):
# Check deprecated get_shape API
img = imaker()
with clear_and_catch_warnings() as w:
warnings.simplefilter('always', DeprecationWarning)
img = imaker()
assert_equal(img.get_shape(), params['shape'])
assert_equal(len(w), 1)

Expand Down
2 changes: 1 addition & 1 deletion nibabel/tripwire.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def is_tripwire(obj):
obj.any_attribute
except TripWireError:
return True
except:
except Exception:
pass
return False

Expand Down