Skip to content

Commit

Permalink
improved error messages by indicating Commit Stop Check as source.
Browse files Browse the repository at this point in the history
  • Loading branch information
nhnb committed Jul 16, 2018
1 parent 343f39a commit 6e97424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/python

# The MIT License (MIT)
# Copyright (c) 2016-2017 HIS e. G.
# Copyright (c) 2016-2018 HIS e. G.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down
12 changes: 6 additions & 6 deletions permissions/checkPrivilege.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The MIT License (MIT)
# Copyright (c) 2016-2017 HIS e. G.
# Copyright (c) 2016-2018 HIS e. G.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -91,17 +91,17 @@ def checkLines(conf, repository, branch, user, group, commitmsg):
(rejected, message) = matches(line, repository, branch, user, group, commitmsg)
if rejected: return (False, message)
else:
return (False, "Malformed configuration.")
return (False, "Rejected by default.")
return (False, "Commit Stop Check: Malformed configuration.")
return (False, "Commit Stop Check: Rejected by default.")


def checkPrivilege2(arguments):
if not arguments.__contains__("repository"):
return(False, "no repository given")
return(False, "Commit Stop Check: no repository given")
elif not arguments.__contains__("branch"):
return (False, "no branch given")
return (False, "Commit Stop Check: no branch given")
elif not arguments.__contains__("user"):
return (False, "no user given")
return (False, "Commit Stop Check: no user given")
else:
repository = arguments["repository"].value
branch = arguments["branch"].value
Expand Down

0 comments on commit 6e97424

Please sign in to comment.