Skip to content

Commit

Permalink
[bug pathes] Issue #2,3,5,6
Browse files Browse the repository at this point in the history
  • Loading branch information
dvm-shlee committed Jun 2, 2020
1 parent 4c79824 commit 45d0701
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions brkraw/lib/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,15 @@ def save_as(self):

def _inspect_ids(self, scan_id, reco_id):
if scan_id not in self._avail.keys():
print(f'Invalid Scan ID.\n'
f'Your input: {scan_id}\n'
f'Available Scan IDs: {list(self._avail.keys())}')
print(f'[Error] Invalid Scan ID.\n'
f' - Your input: {scan_id}\n'
f' - Available Scan IDs: {list(self._avail.keys())}')
raise ValueError
else:
if reco_id not in self._avail[scan_id]:
print(f'Invalid Reco ID.\n'
f'Your input: {reco_id}\n'
f'Available Reco IDs: {self._avail[scan_id]}')
print(f'[Error] Invalid Reco ID.\n'
f' - Your input: {reco_id}\n'
f' - Available Reco IDs: {self._avail[scan_id]}')
raise ValueError

def save_nifti(self, scan_id, reco_id, filename, dir='./', ext='nii.gz',
Expand Down
6 changes: 3 additions & 3 deletions brkraw/scripts/brkraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def main():
if args.bids:
study.save_json(scan_id, reco_id, output_fname)
print('NifTi file is generated... [{}]'.format(output_fname))
except Exception as e:
print('[Warning]::{}'.format(e))
except Exception:
print('Failed..')
else:
for scan_id, recos in study._pvobj.avail_reco_id.items():
for reco_id in recos:
Expand All @@ -131,7 +131,7 @@ def main():
study.save_json(scan_id, reco_id, output_fname)
print('NifTi file is genetared... [{}]'.format(output_fname))
except Exception as e:
print('[Warning]::{}'.format(e))
print('Failed..'.format(e))

elif args.function == 'tonii_all':
path = args.input
Expand Down

0 comments on commit 45d0701

Please sign in to comment.