mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Updated exit code
This commit is contained in:
parent
9339f302c8
commit
8ab1d99697
1 changed files with 19 additions and 19 deletions
|
@ -456,7 +456,7 @@ class Menu(Configs):
|
|||
if len(self.args) == 1:
|
||||
update = UpdateRepositories(self.flags, self.repository)
|
||||
update.repositories()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def upgrade(self) -> None:
|
||||
|
@ -473,7 +473,7 @@ class Menu(Configs):
|
|||
|
||||
if not packages:
|
||||
print('\nEverything is up-to-date!\n')
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
|
||||
if self.is_binary:
|
||||
install = Packages(
|
||||
|
@ -485,21 +485,21 @@ class Menu(Configs):
|
|||
)
|
||||
|
||||
install.execute()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def check_updates(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
check = CheckUpdates(self.flags, self.repository)
|
||||
check.updates()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def repo_info(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
repo = RepoInfo(self.flags, self.repository)
|
||||
repo.info()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def build(self) -> None:
|
||||
|
@ -527,7 +527,7 @@ class Menu(Configs):
|
|||
else:
|
||||
self.usage.help_minimal(f"{self.prog_name}: invalid repository '{self.repository}'")
|
||||
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def install(self) -> None:
|
||||
|
@ -553,7 +553,7 @@ class Menu(Configs):
|
|||
self.check.is_package_unsupported(packages, self.data)
|
||||
install = Slackbuilds(self.repository, self.data, packages, self.flags, mode=command)
|
||||
install.execute()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def download(self) -> None:
|
||||
|
@ -573,7 +573,7 @@ class Menu(Configs):
|
|||
self.check.package_exists_in_the_database(packages, self.data)
|
||||
down_only = DownloadOnly(self.directory, self.flags, self.data, self.repository)
|
||||
down_only.packages(packages)
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def remove(self) -> None:
|
||||
|
@ -589,7 +589,7 @@ class Menu(Configs):
|
|||
|
||||
remove = RemovePackages(packages, self.flags)
|
||||
remove.remove()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def find(self) -> None:
|
||||
|
@ -609,7 +609,7 @@ class Menu(Configs):
|
|||
|
||||
find = FindInstalled(self.flags, packages)
|
||||
find.find()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def view(self) -> None:
|
||||
|
@ -634,7 +634,7 @@ class Menu(Configs):
|
|||
view.package(self.data, packages)
|
||||
else:
|
||||
view.slackbuild(self.data, packages)
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def search(self) -> None:
|
||||
|
@ -650,7 +650,7 @@ class Menu(Configs):
|
|||
|
||||
pkgs = SearchPackage(self.flags, packages, self.repository)
|
||||
pkgs.search()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def dependees(self) -> None:
|
||||
|
@ -671,7 +671,7 @@ class Menu(Configs):
|
|||
|
||||
dependees = Dependees(self.data, packages, self.flags, self.repository)
|
||||
dependees.find()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def tracking(self) -> None:
|
||||
|
@ -692,7 +692,7 @@ class Menu(Configs):
|
|||
|
||||
tracking = Tracking(self.data, packages, self.flags, self.repository)
|
||||
tracking.package()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def help_for_commands(self) -> None:
|
||||
|
@ -729,31 +729,31 @@ class SubMenu:
|
|||
if len(self.args) == 1:
|
||||
version = Version()
|
||||
version.view()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def edit_configs(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
self.form_configs.edit()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def clean_logs(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
self.clean.logs_dependencies()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def clean_tmp(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
self.clean.tmp()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
def clean_data(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
self.clean.db_tables()
|
||||
raise SystemExit()
|
||||
raise SystemExit(0)
|
||||
self.usage.help_short(1)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue