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
Add command line options to enable and disable jobs #820
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use f-strings instead of %
-formatting.
Also, can this be added to the documentation somewhere?
job = self._find_job(self.urlwatch_config.enable) | ||
if job is not None: | ||
job.enabled = True | ||
print('Enabled %r' % (job,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('Enabled %r' % (job,)) | |
print(f'Enabled {job!r}') |
job.enabled = True | ||
print('Enabled %r' % (job,)) | ||
else: | ||
print('Not found: %r' % (self.urlwatch_config.enable,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('Not found: %r' % (self.urlwatch_config.enable,)) | |
print(f'Not found: {self.urlwatch_config.enable!r}') |
job = self._find_job(self.urlwatch_config.disable) | ||
if job is not None: | ||
job.enabled = False | ||
print('Disabled %r' % (job,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('Disabled %r' % (job,)) | |
print(f'Disabled {job!r}') |
job.enabled = False | ||
print('Disabled %r' % (job,)) | ||
else: | ||
print('Not found: %r' % (self.urlwatch_config.disable,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('Not found: %r' % (self.urlwatch_config.disable,)) | |
print(f'Not found: {self.urlwatch_config.disable!r}') |
Closes #813