Verified Commit b50d2df8 authored by Martin Petráček's avatar Martin Petráček
Browse files

domains_reapply: don't update not-existing file (avoid traceback)

parent 084aee8f
......@@ -68,8 +68,10 @@ def main():
print("empty dictionary of replacements, nothing to do")
sys.exit(1)
multiple_replace = MultiReplace(adict)
replace('/var/lib/pakon.db', multiple_replace)
replace('/srv/pakon/pakon-archive.db', multiple_replace)
if os.path.exists('/var/lib/pakon.db'):
replace('/var/lib/pakon.db', multiple_replace)
if os.path.exists('/srv/pakon/pakon-archive.db'):
replace('/srv/pakon/pakon-archive.db', multiple_replace)
if __name__ == "__main__":
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment