Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'calm/tool_util.py')
-rw-r--r--calm/tool_util.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/calm/tool_util.py b/calm/tool_util.py
index 09e40e8..43fe3ea 100644
--- a/calm/tool_util.py
+++ b/calm/tool_util.py
@@ -47,14 +47,19 @@ def permitted(p):
cygname = os.environ.get('CYGNAME', None)
mlist = {}
- mlist = maintainers.add_packages(mlist, common_constants.PKGMAINT, orphanMaint=common_constants.ORPHANMAINT)
+ mlist = maintainers.add_packages(mlist, common_constants.PKGMAINT, trustedMaint=common_constants.TRUSTEDMAINT)
+
+ # CYGNAME is a maintainer for package
+ if p in mlist[cygname].pkgs:
+ return True
+
+ # CYGNAME is a trusted maintainer
+ if cygname in common_constants.TRUSTEDMAINT.split('/'):
+ return True
if cygname not in mlist:
logging.error("'%s' is not a package maintainer" % (cygname))
return False
- if p not in mlist[cygname].pkgs:
- logging.error("package '%s' is not in the package list for maintainer '%s'" % (p, cygname))
- return False
-
- return True
+ logging.error("package '%s' is not in the package list for maintainer '%s'" % (p, cygname))
+ return False