Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def assertDataPath(self, expected_datapath):
self.assertEqual(
expected_datapath, config.get_data_path(self.config, 'general'))
def pull(dry_run, flavor, interactive, debug):
""" Pull down tasks from forges and add them to your taskwarrior tasks.
Relies on configuration in bugwarriorrc
"""
try:
main_section = _get_section_name(flavor)
config = _try_load_config(main_section, interactive)
lockfile_path = os.path.join(get_data_path(config, main_section),
'bugwarrior.lockfile')
lockfile = PIDLockFile(lockfile_path)
lockfile.acquire(timeout=10)
try:
# Get all the issues. This can take a while.
issue_generator = aggregate_issues(config, main_section, debug)
# Stuff them in the taskwarrior db as necessary
synchronize(issue_generator, config, main_section, dry_run)
finally:
lockfile.release()
except LockTimeout:
log.critical(
'Your taskrc repository is currently locked. '
'Remove the file at %s if you are sure no other '
'bugwarrior processes are currently running.' % (