Skip to content

Commit

Permalink
chore: change exit to exit_status in create_module
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdur-rahmaanJ committed Apr 25, 2024
1 parent 1283ebc commit 69aaa1c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions shopyo/api/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,15 +345,14 @@ def create_module_in_box(modulename, boxname):


def createmodulebox(string):
# todo: add a proper result class
exit = True
exit_status = True
message = ""

if "/" in string:
if string.count("/") != 1:
exit = False
exit_status = False
message = "more than one / found in argument"
return [exit, message]
return [exit_status, message]
elif string.count("/") == 1:
boxname = string.split("/")[0]
modulename = string.split("/")[1]
Expand All @@ -367,7 +366,7 @@ def createmodulebox(string):
create_module(string)

message = "Created successfully!"
return [exit, message]
return [exit_status, message]


def collect_static(target_module="modules", verbose=False):
Expand Down

0 comments on commit 69aaa1c

Please sign in to comment.