use git if available
This commit is contained in:
parent
5e3bf28e7e
commit
afefa8dcf0
@ -1,5 +1,7 @@
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
import requests
|
||||
import time
|
||||
import webbrowser
|
||||
@ -91,6 +93,9 @@ class AOCDay:
|
||||
f.write(response.content)
|
||||
f.flush()
|
||||
|
||||
if os.path.exists(".git"):
|
||||
subprocess.call(["git", "add", filename])
|
||||
|
||||
def _submit(self, part: int, answer: Any):
|
||||
answer_cache = JSONFile("answer_cache.json", create=True)
|
||||
str_day = str(self.day)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user