Commit 4f89995f authored by Hanno Schlichting's avatar Hanno Schlichting

Fixed copyright headers and PEP8 changes

parent 912f7582
##############################################################################
#
# This was yanked out of repoze.zope2
# Copyright (c) 2010 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
""" Add a Zope management user to the root Zope user folder """
import sys
from Zope2.utilities.finder import ZopeFinder
def adduser(app, user, pwd):
import transaction
result = app.acl_users._doAddUser(user, pwd, ['Manager'], [])
transaction.commit()
return result
def main(argv=sys.argv):
import sys
try:
......@@ -29,4 +37,3 @@ def main(argv=sys.argv):
if __name__ == '__main__':
main()
##############################################################################
#
# yanked from repoze.zope2
# Copyright (c) 2010 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import os
class ZopeFinder:
def __init__(self, argv):
self.cmd = argv[0]
......@@ -38,4 +47,3 @@ class ZopeFinder:
default_config_file = os.path.join(ihome, 'etc', 'zope.conf')
zope_conf = os.environ.get('ZOPE_CONF', default_config_file)
return zope_conf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment