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