Skip to content
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

Fix bug related to missing params. #2929

Merged
merged 11 commits into from
Aug 3, 2018
40 changes: 17 additions & 23 deletions refinery/data_set_manager/management/commands/process_isatab.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ class Command(BaseCommand):
"""

def add_arguments(self, parser):
parser.add_argumenet(
parser.add_argument('username')
parser.add_argument('base_isa_dir')
parser.add_argument(
'--base_pre_isa_dir',
action='store',
type='string'
)
parser.add_argumenet(
parser.add_argument(
'--file_base_path',
action='store',
type='string',
default=None
)
parser.add_argumenet(
parser.add_argument(
'--public',
action='store_true',
default=False
)
parser.add_argumenet(
parser.add_argument(
'--overwrite',
action='store_true',
default=False
Expand Down Expand Up @@ -123,28 +123,22 @@ def handle(self, username, base_isa_dir, **options):

task_num = 1
total = len(isatab_dict)
for (uuid, filename, skipped) in result.iterate():
for uuid in result.iterate():
try:
if not skipped:
if uuid is not None:
logger.info(
"%s / %s: Successfully parsed %s into "
"DataSet with UUID %s",
task_num, total, filename, uuid)
else:
logger.info(
"%s / %s: Import of %s failed. Please check "
"Celery log files.",
task_num, total, filename, uuid)
if uuid is not None:
logger.info(
"%s / %s: Successfully parsed file into "
"DataSet with UUID %s",
task_num, total, uuid)
else:
logger.info(
"%s / %s: Skipped %s as it has been "
"successfully parsed already. UUID %s",
task_num, total, filename, uuid)
"%s / %s: Import of %s failed. Please check "
"Celery log files.",
task_num, total, uuid)
task_num += 1
sys.stdout.flush()
except:
logger.info("%s / %s: Unsuccessful parsed %s",
task_num, total, filename)
logger.info("%s / %s: Unsuccessfully parsed",
task_num, total)
task_num += 1
sys.stdout.flush()