Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-04-11 21:12:59 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-11 21:12:59 +0200
commit687685809af694ffeb3cc04570c51c2f500b1208 (patch)
tree75fb906a60cd826e3d4c9a5632790a2b26e4dbe9 /archinstall.py
parent15cdae12cc094d37763938c9021d06550a746a2d (diff)
Error when removing a non-existing file.. duh..
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archinstall.py b/archinstall.py
index 26b1757e..020f9790 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -200,8 +200,10 @@ def update_git():
if(default_gw):
print('[N] Updating git!')
## Not the most elegant way to make sure git conflicts doesn't occur (yea fml)
- os.remove('/root/archinstall/archinstall.py')
- os.remove('/root/archinstall/README.md')
+ if os.path.isfile('/root/archinstall/archinstall.py'):
+ os.remove('/root/archinstall/archinstall.py')
+ if os.path.isfile('/root/archinstall/README.md'):
+ os.remove('/root/archinstall/README.md')
simple_command('(cd /root/archinstall; git reset --hard origin/$(git branch | grep "*" | cut -d\' \' -f 2))') # git reset --hard origin/<branch_name> / git fetch --all
print(output)