mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-07 17:24:57 +01:00
Replace sys.exit() module with SystemExit()
This commit is contained in:
parent
22b54888d9
commit
dcc431b608
29 changed files with 49 additions and 76 deletions
|
@ -64,7 +64,7 @@ class Auto(object):
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
self.execute()
|
self.execute()
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
from slpkg.messages import Msg
|
from slpkg.messages import Msg
|
||||||
|
@ -65,7 +64,7 @@ def pkg_upgrade(repo, skip):
|
||||||
return pkgs_for_upgrade
|
return pkgs_for_upgrade
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
|
|
||||||
def installed():
|
def installed():
|
||||||
|
|
|
@ -60,6 +60,6 @@ class Dependencies(object):
|
||||||
return self.dep_results
|
return self.dep_results
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from slpkg.utils import Utils
|
from slpkg.utils import Utils
|
||||||
from slpkg.sizes import units
|
from slpkg.sizes import units
|
||||||
|
@ -133,7 +132,7 @@ class BinaryInstall(object):
|
||||||
Msg().not_found(self.if_upgrade)
|
Msg().not_found(self.if_upgrade)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def update_deps(self):
|
def update_deps(self):
|
||||||
"""Update dependencies dictionary with all package
|
"""Update dependencies dictionary with all package
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from slpkg.utils import Utils
|
from slpkg.utils import Utils
|
||||||
from slpkg.toolbar import status
|
from slpkg.toolbar import status
|
||||||
from slpkg.blacklist import BlackList
|
from slpkg.blacklist import BlackList
|
||||||
|
@ -49,4 +47,4 @@ def search_pkg(name, repo):
|
||||||
return pkg_name
|
return pkg_name
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
from arguments import usage
|
from arguments import usage
|
||||||
from init import Initialization
|
from init import Initialization
|
||||||
|
@ -76,12 +74,12 @@ class Updates(object):
|
||||||
self.check = self.all_repos[self.repo]()
|
self.check = self.all_repos[self.repo]()
|
||||||
except OSError:
|
except OSError:
|
||||||
usage(self.repo)
|
usage(self.repo)
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
elif self.repo in self.meta.repositories:
|
elif self.repo in self.meta.repositories:
|
||||||
self.check = self._init.custom(self.repo)
|
self.check = self._init.custom(self.repo)
|
||||||
else:
|
else:
|
||||||
usage(self.repo)
|
usage(self.repo)
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
self.status_bar()
|
self.status_bar()
|
||||||
self.status()
|
self.status()
|
||||||
self.print_status(self.repo)
|
self.print_status(self.repo)
|
||||||
|
@ -97,7 +95,7 @@ class Updates(object):
|
||||||
self.check = self.all_repos[repo]()
|
self.check = self.all_repos[repo]()
|
||||||
except OSError:
|
except OSError:
|
||||||
usage(self.repo)
|
usage(self.repo)
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
elif repo in self.meta.repositories:
|
elif repo in self.meta.repositories:
|
||||||
self.check = self._init.custom(repo)
|
self.check = self._init.custom(repo)
|
||||||
self.status()
|
self.status()
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from md5sum import md5
|
from md5sum import md5
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
from __metadata__ import MetaData as _meta_
|
from __metadata__ import MetaData as _meta_
|
||||||
|
@ -47,7 +45,7 @@ def check_md5(pkg_md5, src_file):
|
||||||
Msg().template(78)
|
Msg().template(78)
|
||||||
print("")
|
print("")
|
||||||
if not Msg().answer() in ["y", "Y"]:
|
if not Msg().answer() in ["y", "Y"]:
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
else:
|
else:
|
||||||
Msg().template(78)
|
Msg().template(78)
|
||||||
print("| MD5SUM check for {0} [ {1}PASSED{2} ]".format(
|
print("| MD5SUM check for {0} [ {1}PASSED{2} ]".format(
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from utils import Utils
|
from utils import Utils
|
||||||
|
@ -73,7 +72,7 @@ class Config(object):
|
||||||
self.meta.color["ENDC"]))
|
self.meta.color["ENDC"]))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
print("") # new line at end
|
print("") # new line at end
|
||||||
|
|
||||||
def edit(self, editor):
|
def edit(self, editor):
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
|
@ -68,7 +67,7 @@ class Download(object):
|
||||||
dwn_count += 1
|
dwn_count += 1
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print # new line at cancel
|
print # new line at cancel
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def _directory_prefix(self):
|
def _directory_prefix(self):
|
||||||
"""Downloader options for specific directory
|
"""Downloader options for specific directory
|
||||||
|
@ -90,7 +89,7 @@ class Download(object):
|
||||||
Msg().template(78)
|
Msg().template(78)
|
||||||
print("")
|
print("")
|
||||||
if not Msg().answer() in ["y", "Y"]:
|
if not Msg().answer() in ["y", "Y"]:
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def _check_certificate(self):
|
def _check_certificate(self):
|
||||||
"""Check for certificates options for wget
|
"""Check for certificates options for wget
|
||||||
|
@ -106,4 +105,4 @@ class Download(object):
|
||||||
print("")
|
print("")
|
||||||
self.downder_options += certificate
|
self.downder_options += certificate
|
||||||
if not Msg().answer() in ["y", "Y"]:
|
if not Msg().answer() in ["y", "Y"]:
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +43,7 @@ class FileSize(object):
|
||||||
return " "
|
return " "
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at cancel
|
print("") # new line at cancel
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def local(self):
|
def local(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
from __metadata__ import MetaData as _meta_
|
from __metadata__ import MetaData as _meta_
|
||||||
|
@ -63,7 +62,7 @@ class PackageHealth(object):
|
||||||
print(line)
|
print(line)
|
||||||
except (KeyboardInterrupt, IOError):
|
except (KeyboardInterrupt, IOError):
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
"""Get started test each package and read file list
|
"""Get started test each package and read file list
|
||||||
|
@ -81,7 +80,7 @@ class PackageHealth(object):
|
||||||
self.check(line, pkg)
|
self.check(line, pkg)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
self.results()
|
self.results()
|
||||||
|
|
||||||
def results(self):
|
def results(self):
|
||||||
|
|
|
@ -659,7 +659,7 @@ class Initialization(object):
|
||||||
shutil.rmtree(files)
|
shutil.rmtree(files)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
Update().repository(only)
|
Update().repository(only)
|
||||||
|
|
||||||
|
|
||||||
|
@ -700,9 +700,9 @@ class Update(object):
|
||||||
sys.stdout.write(self.error)
|
sys.stdout.write(self.error)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
print("") # new line at end
|
print("") # new line at end
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
|
|
||||||
def check_exists_repositories():
|
def check_exists_repositories():
|
||||||
|
@ -721,4 +721,4 @@ def check_exists_repositories():
|
||||||
print("\n Please update packages lists. Run 'slpkg update'.\n" +
|
print("\n Please update packages lists. Run 'slpkg update'.\n" +
|
||||||
" This command should be used to synchronize packages\n" +
|
" This command should be used to synchronize packages\n" +
|
||||||
" lists from the repositories are enabled.\n")
|
" lists from the repositories are enabled.\n")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -555,7 +555,7 @@ class ArgParse(object):
|
||||||
if not_found:
|
if not_found:
|
||||||
for ntf in not_found:
|
for ntf in not_found:
|
||||||
Msg().pkg_not_found("", ntf, "Not installed", "")
|
Msg().pkg_not_found("", ntf, "Not installed", "")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -568,7 +568,7 @@ def main():
|
||||||
|
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
usage("")
|
usage("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
argparse.auto_detect(args)
|
argparse.auto_detect(args)
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Msg(object):
|
||||||
"""
|
"""
|
||||||
if user != "root":
|
if user != "root":
|
||||||
print("\nslpkg: error: must have root privileges\n")
|
print("\nslpkg: error: must have root privileges\n")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def build_FAILED(self, sbo_url, prgnam):
|
def build_FAILED(self, sbo_url, prgnam):
|
||||||
"""Print error message if build failed
|
"""Print error message if build failed
|
||||||
|
@ -136,7 +136,7 @@ class Msg(object):
|
||||||
answer = raw_input("Would you like to continue [y/N]? ")
|
answer = raw_input("Would you like to continue [y/N]? ")
|
||||||
except (KeyboardInterrupt, EOFError):
|
except (KeyboardInterrupt, EOFError):
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
def reference(self, install, upgrade):
|
def reference(self, install, upgrade):
|
||||||
|
|
|
@ -104,7 +104,7 @@ class BuildPackage(object):
|
||||||
Msg().pkg_not_found("\n", self.prgnam, "Wrong file", "\n")
|
Msg().pkg_not_found("\n", self.prgnam, "Wrong file", "\n")
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def _makeflags(self):
|
def _makeflags(self):
|
||||||
"""Set variable MAKEFLAGS with the numbers of
|
"""Set variable MAKEFLAGS with the numbers of
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from slpkg.utils import Utils
|
from slpkg.utils import Utils
|
||||||
|
@ -99,7 +98,7 @@ class PackageManager(object):
|
||||||
str(len(self.removed)), msg))
|
str(len(self.removed)), msg))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
if remove_pkg in ["y", "Y"]:
|
if remove_pkg in ["y", "Y"]:
|
||||||
self._check_if_used(self.binary)
|
self._check_if_used(self.binary)
|
||||||
for rmv in self.removed:
|
for rmv in self.removed:
|
||||||
|
@ -131,7 +130,7 @@ class PackageManager(object):
|
||||||
print("")
|
print("")
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
return remove_dep
|
return remove_dep
|
||||||
|
|
||||||
def _view_removed(self):
|
def _view_removed(self):
|
||||||
|
@ -176,7 +175,7 @@ class PackageManager(object):
|
||||||
os.remove(self.dep_path + package) # remove log
|
os.remove(self.dep_path + package) # remove log
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def _rmv_deps(self, dependencies, package):
|
def _rmv_deps(self, dependencies, package):
|
||||||
"""Remove dependencies
|
"""Remove dependencies
|
||||||
|
@ -210,7 +209,7 @@ class PackageManager(object):
|
||||||
self.skip = raw_input(" > ").split()
|
self.skip = raw_input(" > ").split()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
for s in self.skip:
|
for s in self.skip:
|
||||||
if s in self.removed:
|
if s in self.removed:
|
||||||
self.removed.remove(s)
|
self.removed.remove(s)
|
||||||
|
@ -348,7 +347,7 @@ class PackageManager(object):
|
||||||
print("") # new line at end
|
print("") # new line at end
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def list_greps(self, repo, packages):
|
def list_greps(self, repo, packages):
|
||||||
"""Grep packages
|
"""Grep packages
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
from sbo.greps import SBoGrep
|
from sbo.greps import SBoGrep
|
||||||
from pkg.manager import PackageManager
|
from pkg.manager import PackageManager
|
||||||
|
@ -63,7 +61,7 @@ def find_from_repos(pkg):
|
||||||
_meta_.color["GREY"], count_pkg, count_repo, _meta_.color["ENDC"]))
|
_meta_.color["GREY"], count_pkg, count_repo, _meta_.color["ENDC"]))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
|
|
||||||
def sbo_version(repo, find):
|
def sbo_version(repo, find):
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from sizes import units
|
from sizes import units
|
||||||
from utils import Utils
|
from utils import Utils
|
||||||
|
@ -101,7 +100,7 @@ class RepoInfo(object):
|
||||||
for key, value in sorted(self.form.iteritems()):
|
for key, value in sorted(self.form.iteritems()):
|
||||||
print self.meta.color["GREY"] + key + self.meta.color["ENDC"], value
|
print self.meta.color["GREY"] + key + self.meta.color["ENDC"], value
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def repository_data(self, repo):
|
def repository_data(self, repo):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from messages import Msg
|
from messages import Msg
|
||||||
from repositories import Repo
|
from repositories import Repo
|
||||||
from __metadata__ import MetaData as _meta_
|
from __metadata__ import MetaData as _meta_
|
||||||
|
@ -92,4 +90,4 @@ class RepoList(object):
|
||||||
print("For enable or disable default repositories edit "
|
print("For enable or disable default repositories edit "
|
||||||
"'/etc/slpkg/slpkg.conf' file.\n{0}".format(
|
"'/etc/slpkg/slpkg.conf' file.\n{0}".format(
|
||||||
self.meta.color["ENDC"]))
|
self.meta.color["ENDC"]))
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from utils import Utils
|
from utils import Utils
|
||||||
from __metadata__ import MetaData as _meta_
|
from __metadata__ import MetaData as _meta_
|
||||||
|
@ -52,17 +51,17 @@ class Repo(object):
|
||||||
print("\nRepository name '{0}' exist, select different name.\n"
|
print("\nRepository name '{0}' exist, select different name.\n"
|
||||||
"View all repositories with command 'repo-list'.\n".format(
|
"View all repositories with command 'repo-list'.\n".format(
|
||||||
repo))
|
repo))
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
elif len(repo) > 6:
|
elif len(repo) > 6:
|
||||||
print("\nMaximum repository name length must be six (6) "
|
print("\nMaximum repository name length must be six (6) "
|
||||||
"characters\n")
|
"characters\n")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
with open(self.repo_file, "a") as repos:
|
with open(self.repo_file, "a") as repos:
|
||||||
new_line = " {0}{1}{2}\n".format(repo, " " * (10 - len(repo)), url)
|
new_line = " {0}{1}{2}\n".format(repo, " " * (10 - len(repo)), url)
|
||||||
repos.write(new_line)
|
repos.write(new_line)
|
||||||
repos.close()
|
repos.close()
|
||||||
print("\nRepository '{0}' successfully added\n".format(repo))
|
print("\nRepository '{0}' successfully added\n".format(repo))
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def remove(self, repo):
|
def remove(self, repo):
|
||||||
"""
|
"""
|
||||||
|
@ -81,7 +80,7 @@ class Repo(object):
|
||||||
repos.close()
|
repos.close()
|
||||||
if not rem_repo:
|
if not rem_repo:
|
||||||
print("\nRepository '{0}' doesn't exist\n".format(repo))
|
print("\nRepository '{0}' doesn't exist\n".format(repo))
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def custom_repository(self):
|
def custom_repository(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
from slpkg.messages import Msg
|
from slpkg.messages import Msg
|
||||||
|
@ -57,7 +56,7 @@ def sbo_upgrade(skip):
|
||||||
return upgrade_names
|
return upgrade_names
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
|
|
||||||
def sbo_list():
|
def sbo_list():
|
||||||
|
|
|
@ -65,6 +65,6 @@ class Requires(object):
|
||||||
return self.dep_results
|
return self.dep_results
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from slpkg.utils import Utils
|
from slpkg.utils import Utils
|
||||||
from slpkg.repositories import Repo
|
from slpkg.repositories import Repo
|
||||||
from slpkg.__metadata__ import MetaData as _meta_
|
from slpkg.__metadata__ import MetaData as _meta_
|
||||||
|
@ -48,4 +46,4 @@ def sbo_search_pkg(name):
|
||||||
return ""
|
return ""
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from slpkg.utils import Utils
|
from slpkg.utils import Utils
|
||||||
from slpkg.messages import Msg
|
from slpkg.messages import Msg
|
||||||
|
@ -131,7 +130,7 @@ class SBoInstall(object):
|
||||||
Msg().not_found(if_upgrade)
|
Msg().not_found(if_upgrade)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def update_deps(self):
|
def update_deps(self):
|
||||||
"""Update dependencies dictionary with all package
|
"""Update dependencies dictionary with all package
|
||||||
|
@ -315,7 +314,7 @@ class SBoInstall(object):
|
||||||
binary = (self.meta.output + max(binary_list)).split()
|
binary = (self.meta.output + max(binary_list)).split()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
Msg().build_FAILED(sbo_url, prgnam)
|
Msg().build_FAILED(sbo_url, prgnam)
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
find = GetFromInstalled(pkg).name()
|
find = GetFromInstalled(pkg).name()
|
||||||
if find == pkg:
|
if find == pkg:
|
||||||
print("[ {0}Upgrading{1} ] --> {2}".format(
|
print("[ {0}Upgrading{1} ] --> {2}".format(
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -128,7 +127,7 @@ class Patches(object):
|
||||||
"date\n".format(slack_arch, self.version, slack_ver()))
|
"date\n".format(slack_arch, self.version, slack_ver()))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def store(self):
|
def store(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import tarfile
|
import tarfile
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -62,7 +61,7 @@ def it_self_update():
|
||||||
if answer in ["y", "Y"]:
|
if answer in ["y", "Y"]:
|
||||||
print("") # new line after answer
|
print("") # new line after answer
|
||||||
else:
|
else:
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
dwn_link = ["https://{0}.com/{1}/{2}/archive/"
|
dwn_link = ["https://{0}.com/{1}/{2}/archive/"
|
||||||
"v{3}.tar.gz".format(repository, _meta_.__author__,
|
"v{3}.tar.gz".format(repository, _meta_.__author__,
|
||||||
_meta_.__all__,
|
_meta_.__all__,
|
||||||
|
@ -85,4 +84,4 @@ def it_self_update():
|
||||||
else:
|
else:
|
||||||
print("\n{0}: There is no new version, already used the last !"
|
print("\n{0}: There is no new version, already used the last !"
|
||||||
"\n".format(_meta_.__all__))
|
"\n".format(_meta_.__all__))
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -41,4 +41,4 @@ def status(sec):
|
||||||
time.sleep(float(sec))
|
time.sleep(float(sec))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
from __metadata__ import MetaData as _meta_
|
from __metadata__ import MetaData as _meta_
|
||||||
|
@ -48,4 +47,4 @@ class URL(object):
|
||||||
return " "
|
return " "
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("") # new line at exit
|
print("") # new line at exit
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from splitting import split_package
|
from splitting import split_package
|
||||||
|
|
||||||
|
@ -70,7 +69,7 @@ class Utils(object):
|
||||||
return packages
|
return packages
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
||||||
def check_downloaded(self, path, maybe_downloaded):
|
def check_downloaded(self, path, maybe_downloaded):
|
||||||
"""
|
"""
|
||||||
|
@ -95,4 +94,4 @@ class Utils(object):
|
||||||
return line
|
return line
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("")
|
print("")
|
||||||
sys.exit(0)
|
raise SystemExit()
|
||||||
|
|
Loading…
Reference in a new issue