diff options
Diffstat (limited to 'src/backend/setbranch.py')
-rw-r--r-- | src/backend/setbranch.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/backend/setbranch.py b/src/backend/setbranch.py index ca349f9..7ebd6f7 100644 --- a/src/backend/setbranch.py +++ b/src/backend/setbranch.py @@ -101,15 +101,22 @@ def brch_s_warn(branch, remote): def start(branch, remote): + is_online = sisyphus.checkenv.connectivity() + if sisyphus.checkenv.root(): - sisyphus.purgeenv.branch() - sisyphus.purgeenv.metadata() - ins_g_repo(branch, remote) - ins_r_repo(branch, remote) - ins_p_cfg_repo(branch, remote) - sisyphus.setjobs.start() - sisyphus.setprofile.start() - brch_s_warn(branch, remote) + if is_online == 1: + sisyphus.purgeenv.branch() + sisyphus.purgeenv.metadata() + ins_g_repo(branch, remote) + ins_r_repo(branch, remote) + ins_p_cfg_repo(branch, remote) + sisyphus.setjobs.start() + sisyphus.setprofile.start() + brch_s_warn(branch, remote) + else: + print(sisyphus.getcolor.brigt_red + + "\nNo internet connection; Aborting!\n" + sisyphus.getcolor.reset) + sys.exit() else: print(sisyphus.getcolor.bright_red + "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset) |