Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if _location.endswith("/"):
# dont need the final slash
_location = _location[:-1]
output = ontospy.action_update_library_location(_location)
if output:
printDebug("Note: no files have been moved or deleted (this has to be done manually)", "comment")
printDebug("----------\n" + "New location: '%s'" % _location, "important")
else:
printDebug("----------\n" + "Please specify an existing folder path.", "important")
raise SystemExit(1)
# reset local stuff
if opts._delete:
res = ontospy.actions_delete()
raise SystemExit(1)
# reset local stuff
if opts.erase:
ontospy.action_erase()
raise SystemExit(1)
# cache local ontologies
if opts.cache:
sTime = time.time()
ontospy.action_cache()
# finally: print(some stats....)
eTime = time.time()
tTime = eTime - sTime
printDebug("-" * 10)
printDebug("Time: %0.2fs" % tTime, "comment")