write_when_new, gitea, ifup/ifdown

- create parent directory with root access, if needed
- omit gitea check when repo is not available
- replace 'ifup <net>  by  ifconfig <net> up'
This commit is contained in:
2025-06-26 19:29:30 +02:00
parent 398943fd92
commit 4e622d5a1c
2 changed files with 10 additions and 4 deletions

View File

@@ -86,7 +86,11 @@ def change_to_gitea(doit, *repos):
cwd = os.getcwd()
try:
for repo in repos:
os.chdir(Path('~').expanduser() / repo)
repodir = Path('~').expanduser() / repo
if not repodir.is_dir():
print(repodir, 'does not exist')
continue
os.chdir(repodir)
try:
parser = ConfigParser()
parser.read('.git/config')