Skip to content

Commit

Permalink
Remove unneccessary error-handling
Browse files Browse the repository at this point in the history
Co-authored-by: Johanna England <[email protected]>
  • Loading branch information
hmpf and johannaengland authored Nov 2, 2023
1 parent cdc959c commit 7237b0c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions bin/navuser
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,8 @@ def adduser(args):


def removeuser(args):
try:
args.login.delete()
except args.login.DoesNotExist:
print(
"User %s is not registered, cannot remove" % args.login.login,
file=sys.stderr,
)
sys.exit(1)
else:
print("User %s has been removed" % args.login.login, file=sys.stderr)
args.login.delete()
print("User %s has been removed" % args.login.login, file=sys.stderr)


def adminify(args):
Expand Down

0 comments on commit 7237b0c

Please sign in to comment.