Skip to content

Conversation

@millar
Copy link
Contributor

@millar millar commented Apr 17, 2018

No description provided.

return

for alternative in options['alternatives']:
if ':' in alternative:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better we include the : syntax in help message for parser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Contributor

@lisongx lisongx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm for other parts

try:
experiment = Experiment.objects.create(name=options['name'])
except IntegrityError:
self.stdout.write(self.style.ERROR("An experiment named '%s' already exists" % options['name']))
Copy link

@JonathanUsername JonathanUsername Jun 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.stderr is convention for errors surely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raise CommandError("Wibble failure")

Just checked docs and this might be the recommended practice

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants