Commit 4ba09362 authored by Martijn Pieters's avatar Martijn Pieters

Clean up indentation and trailing whitespace.

parent a034b0a5
......@@ -64,4 +64,3 @@ class DebugLogger:
def log(*args): pass
......@@ -764,6 +764,3 @@ class FCGIPipe:
#----------------------------------------------------------------------
......@@ -122,10 +122,3 @@ class FTPRequest(HTTPRequest):
if os.sep != '/':
path=path.replace(os.sep,'/')
return path
......@@ -308,4 +308,3 @@ def make_response(request, headers):
request.header).lower()
response._server_version=request.channel.server.SERVER_IDENT
return response
......@@ -372,4 +372,3 @@ class zhttp_server(http_server):
# override asyncore limits for nt's listen queue size
self.accepting = 1
return self.socket.listen (num)
......@@ -102,4 +102,3 @@ class file_close_producer:
file.close()
self.file=None
return ''
......@@ -35,4 +35,3 @@ def Wakeup(thunk=None):
del socket_map[the_trigger._fileno]
the_trigger = simple_trigger() # adds itself back into socket_map
the_trigger.pull_trigger(thunk)
......@@ -22,4 +22,3 @@ print '-'*78
print 'Building extension modules'
do('%s setup.py build_ext -i' % sys.executable)
......@@ -29,7 +29,3 @@ def main(home, user='', group=''):
print 'creating default database'
open(db_path,'wb').write(open(dd_path,'rb').read())
ch(db_path, user, group)
......@@ -39,4 +39,3 @@ INSTANCE_HOME=%(cwd)s
''' % vars())
ch(name, user, group, 0755)
......@@ -12,7 +12,7 @@
#
##############################################################################
# Compatibility module
# $Id: Xaq.py,v 1.2 2002/06/10 22:48:46 jeremy Exp $
# $Id: Xaq.py,v 1.3 2002/08/14 21:24:48 mj Exp $
import Acquisition
Acquirer = Acquisition.Explicit
......@@ -14,8 +14,8 @@
__doc__='''Examples from the Acquisition Algebra Presentation
$Id: test_AqAlg.py,v 1.4 2002/06/10 22:48:47 jeremy Exp $'''
__version__='$Revision: 1.4 $'[11:-2]
$Id: test_AqAlg.py,v 1.5 2002/08/14 21:24:48 mj Exp $'''
__version__='$Revision: 1.5 $'[11:-2]
import Acquisition
......@@ -99,4 +99,3 @@ def main():
if __name__=='__main__':
main()
......@@ -27,4 +27,3 @@ x=bar()
hi=x.hi
print type(hi)
hi(1,2,3,name='spam')
......@@ -30,4 +30,3 @@ try:
A().hi()
raise 'Program error', 'spam'
except AttributeError: pass
......@@ -18,4 +18,3 @@ def pickle_complex(c):
return complex, (c.real, c.imag)
pickle(type(1j), pickle_complex, complex)
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.6 $'[11:-2]
__version__='$Revision: 1.7 $'[11:-2]
import sha, binascii
from binascii import b2a_base64, a2b_base64
......
......@@ -12,8 +12,8 @@
##############################################################################
'''Add security system support to Document Templates
$Id: DTML.py,v 1.9 2001/11/28 15:50:51 matt Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
$Id: DTML.py,v 1.10 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
from DocumentTemplate import DT_Util
import SecurityManagement, string, math, whrandom, random
......@@ -127,4 +127,3 @@ class DTMLSecurityAPI:
return r
DT_Util.TemplateDict.__dict__.update(DTMLSecurityAPI.__dict__)
......@@ -13,8 +13,8 @@
__doc__='''Support for owned objects
$Id: Owned.py,v 1.17 2002/06/12 18:14:39 shane Exp $'''
__version__='$Revision: 1.17 $'[11:-2]
$Id: Owned.py,v 1.18 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.18 $'[11:-2]
import Globals, urlparse, SpecialUsers, ExtensionClass
from AccessControl import getSecurityManager, Unauthorized
......@@ -253,4 +253,3 @@ def ownerInfo(user,
path.reverse()
return path, uid
......@@ -13,8 +13,8 @@
__doc__='''short description
$Id: Permission.py,v 1.9 2001/12/13 14:24:26 andreasjung Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
$Id: Permission.py,v 1.10 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
import string, Products, Globals
......
......@@ -13,8 +13,8 @@
__doc__='''Objects that implement Permission-based roles.
$Id: PermissionRole.py,v 1.15 2001/12/13 14:24:41 andreasjung Exp $'''
__version__='$Revision: 1.15 $'[11:-2]
$Id: PermissionRole.py,v 1.16 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.16 $'[11:-2]
_use_python_impl = 0
import os
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Constant definitions for built-in Zope permissions"""
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
access_contents_information='Access contents information'
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Access control support"""
__version__='$Revision: 1.54 $'[11:-2]
__version__='$Revision: 1.55 $'[11:-2]
from Globals import DTMLFile, MessageDialog, Dictionary
......@@ -562,4 +562,3 @@ def gather_permissions(klass, result, seen):
seen[name]=None
gather_permissions(base, result, seen)
return result
......@@ -13,8 +13,8 @@
__doc__='''short description
$Id: SecurityManagement.py,v 1.6 2001/11/28 15:50:51 matt Exp $'''
__version__='$Revision: 1.6 $'[11:-2]
$Id: SecurityManagement.py,v 1.7 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.7 $'[11:-2]
def getSecurityManager():
"""Get a security manager, for the current thread.
......@@ -68,5 +68,3 @@ class SecurityContext:
self.stack=[]
self.user=user
self.objectCache = {}
......@@ -13,8 +13,8 @@
__doc__='''short description
$Id: SecurityManager.py,v 1.12 2001/12/13 14:23:44 andreasjung Exp $'''
__version__='$Revision: 1.12 $'[11:-2]
$Id: SecurityManager.py,v 1.13 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.13 $'[11:-2]
import ZopeSecurityPolicy, os
......
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Collect rules for access to objects that don\'t have roles.
$Id: SimpleObjectPolicies.py,v 1.11 2002/03/12 19:37:14 evan Exp $'''
__version__='$Revision: 1.11 $'[11:-2]
$Id: SimpleObjectPolicies.py,v 1.12 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.12 $'[11:-2]
_noroles=[] # this is imported from various places
......@@ -58,4 +58,3 @@ def allow_type(Type, allowed=1):
if not (isinstance(allowed, IntType) or isinstance(allowed, DictType)):
raise ValueError, "The 'allowed' argument must be an int or dict."
ContainerAssertions[Type] = allowed
......@@ -13,5 +13,5 @@
__doc__='''Place to find special users
This is needed to avoid a circular import problem.
$Id: SpecialUsers.py,v 1.3 2001/11/28 15:50:52 matt Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
$Id: SpecialUsers.py,v 1.4 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.4 $'[11:-2]
......@@ -12,7 +12,7 @@
##############################################################################
"""Access control package"""
__version__='$Revision: 1.169 $'[11:-2]
__version__='$Revision: 1.170 $'[11:-2]
import Globals, socket, SpecialUsers,re
import os
......
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.10 $'[11:-2]
__version__='$Revision: 1.11 $'[11:-2]
from RestrictedPython.Guards import safe_builtins, _full_read_guard, \
full_write_guard
......
......@@ -13,8 +13,8 @@
__doc__='''Define Zope\'s default security policy
$Id: ZopeSecurityPolicy.py,v 1.18 2002/01/11 17:14:27 evan Exp $'''
__version__='$Revision: 1.18 $'[11:-2]
$Id: ZopeSecurityPolicy.py,v 1.19 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.19 $'[11:-2]
_use_python_impl = 0
......
......@@ -16,7 +16,7 @@ class ResultObject:
""" result object used for keeping results from the
ZPublisher.Zope() calls
$Id: ResultObject.py,v 1.3 2001/11/28 15:50:52 matt Exp $
$Id: ResultObject.py,v 1.4 2002/08/14 21:27:32 mj Exp $
"""
def __str__(self,expected=-1,with_output=1):
......@@ -36,4 +36,3 @@ class ResultObject:
def __call__(self,expected=-1):
return self.__str__(expected)
......@@ -39,7 +39,7 @@ __bobo_before__=AccessControl.SecurityManagement.noSecurityManager
class SecurityBase(unittest.TestCase) :
""" Base class for all security tests
$Id: SecurityBase.py,v 1.6 2001/11/28 15:50:52 matt Exp $
$Id: SecurityBase.py,v 1.7 2002/08/14 21:27:32 mj Exp $
"""
status_regex = re.compile("Status: ([0-9]{1,4}) (.*)",re.I)\
......
......@@ -42,5 +42,3 @@ if not sys.modules.has_key('Testing'):
import Testing, unittest
execfile(os.path.join(os.path.split(Testing.__file__)[0], 'common.py'))
......@@ -13,7 +13,7 @@
#
##############################################################################
# $Id: regressionSecurity.py,v 1.4 2001/11/28 15:50:52 matt Exp $
# $Id: regressionSecurity.py,v 1.5 2002/08/14 21:27:32 mj Exp $
import os, sys, unittest
......
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
......@@ -17,8 +16,8 @@ To be removed together with the API in due time.
"""
__rcs_id__='$Id: testDeprecatedAPI.py,v 1.3 2001/11/28 15:50:52 matt Exp $'
__version__='$Revision: 1.3 $'[11:-2]
__rcs_id__='$Id: testDeprecatedAPI.py,v 1.4 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.4 $'[11:-2]
import ZODB # Sigh. Persistent needs to be set, so we import ZODB.
from AccessControl import User
......
......@@ -13,8 +13,8 @@
"""Module Import Tests
"""
__rcs_id__='$Id: testModuleSecurity.py,v 1.2 2002/01/11 17:14:27 evan Exp $'
__version__='$Revision: 1.2 $'[11:-2]
__rcs_id__='$Id: testModuleSecurity.py,v 1.3 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.3 $'[11:-2]
import os, sys, unittest
......
......@@ -13,8 +13,8 @@
"""Test of AuthEncoding
"""
__rcs_id__='$Id: testPasswordDigest.py,v 1.3 2001/11/28 15:50:52 matt Exp $'
__version__='$Revision: 1.3 $'[11:-2]
__rcs_id__='$Id: testPasswordDigest.py,v 1.4 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.4 $'[11:-2]
import os, sys, unittest
......
......@@ -13,8 +13,8 @@
"""Tests of PermissionRole
"""
__rcs_id__='$Id: testPermissionRole.py,v 1.2 2001/11/28 15:50:52 matt Exp $'
__version__='$Revision: 1.2 $'[11:-2]
__rcs_id__='$Id: testPermissionRole.py,v 1.3 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.3 $'[11:-2]
import os, sys, unittest
......
......@@ -13,8 +13,8 @@
"""Document Template Tests
"""
__rcs_id__='$Id: testSecurity.py,v 1.9 2002/04/03 20:59:49 shane Exp $'
__version__='$Revision: 1.9 $'[11:-2]
__rcs_id__='$Id: testSecurity.py,v 1.10 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.10 $'[11:-2]
import os, sys, unittest
......
......@@ -13,8 +13,8 @@
"""User folder tests
"""
__rcs_id__='$Id: testUserFolder.py,v 1.4 2001/11/28 15:50:52 matt Exp $'
__version__='$Revision: 1.4 $'[11:-2]
__rcs_id__='$Id: testUserFolder.py,v 1.5 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.5 $'[11:-2]
import os, sys, unittest
......
......@@ -13,8 +13,8 @@
"""Tests of ZopeSecurityPolicy
"""
__rcs_id__='$Id: testZopeSecurityPolicy.py,v 1.4 2002/01/11 17:14:27 evan Exp $'
__version__='$Revision: 1.4 $'[11:-2]
__rcs_id__='$Id: testZopeSecurityPolicy.py,v 1.5 2002/08/14 21:28:08 mj Exp $'
__version__='$Revision: 1.5 $'[11:-2]
import os, sys, unittest
......@@ -255,4 +255,3 @@ def main():
if __name__ == '__main__':
main()
......@@ -31,4 +31,3 @@ class Unauthorized(zExceptions.Unauthorized):
c = getattr(v, '__class__', type(v))
c = getattr(c, '__name__', 'object')
return "a particular %s" % c
......@@ -11,7 +11,7 @@
#
##############################################################################
__doc__="""System management components"""
__version__='$Revision: 1.80 $'[11:-2]
__version__='$Revision: 1.81 $'[11:-2]
import sys,os,time,Globals, Acquisition, os, Undo
......@@ -441,4 +441,3 @@ class ApplicationManager(Folder,CacheManager):
self._objects = tuple(lst)
return Folder.objectIds(self, spec)
......@@ -13,8 +13,8 @@
__doc__='''Cache management support
$Id: CacheManager.py,v 1.25 2002/06/10 20:20:43 shane Exp $'''
__version__='$Revision: 1.25 $'[11:-2]
$Id: CacheManager.py,v 1.26 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.26 $'[11:-2]
import Globals, time, sys
from DateTime import DateTime
......@@ -362,4 +362,3 @@ class CacheManager:
Globals.default__class_init__(CacheManager)
......@@ -13,7 +13,7 @@
"""Commonly used utility functions."""
__version__='$Revision: 1.14 $'[11:-2]
__version__='$Revision: 1.15 $'[11:-2]
import sys, os, time
......
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__ = "$Revision: 1.7 $"[11:-2]
__version__ = "$Revision: 1.8 $"[11:-2]
import OFS, Acquisition, Globals
from AccessControl import getSecurityManager, ClassSecurityInfo
......
......@@ -31,7 +31,7 @@
target='_top')
</PRE>"""
__version__='$Revision: 1.7 $'[11:-2]
__version__='$Revision: 1.8 $'[11:-2]
from Globals import HTML
......
......@@ -14,8 +14,8 @@ __doc__='''Standard routines for handling extensions.
Extensions currently include external methods and pluggable brains.
$Id: Extensions.py,v 1.18 2002/02/07 17:37:10 andreasjung Exp $'''
__version__='$Revision: 1.18 $'[11:-2]
$Id: Extensions.py,v 1.19 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.19 $'[11:-2]
import os, zlib, rotor, imp
import Products
......
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Factory objects
$Id: Factory.py,v 1.25 2001/11/28 15:50:52 matt Exp $'''
__version__='$Revision: 1.25 $'[11:-2]
$Id: Factory.py,v 1.26 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.26 $'[11:-2]
import OFS.SimpleItem, Acquisition, Globals, AccessControl.Role
import Products, Product
......@@ -112,4 +112,3 @@ class Factory(
)
class ProductFactory(Factory): pass
......@@ -109,5 +109,3 @@ class ofWrapper(ExtensionClass.Base):
self._o=o
def __of__(self, parent): return self.__dict__['_o']
......@@ -13,7 +13,7 @@
"""Commonly used utility functions."""
__version__='$Revision: 1.10 $'[11:-2]
__version__='$Revision: 1.11 $'[11:-2]
import os, sys, Products
from Common import package_home, realpath
......
......@@ -57,4 +57,3 @@ def beforeApplyHotfix(id, req_major, req_minor, req_micro):
apply_hotfix = APPLY
logHotfix(id, apply_hotfix)
return apply_hotfix
......@@ -12,7 +12,7 @@
##############################################################################
"""Image object that is stored in a file"""
__version__='$Revision: 1.17 $'[11:-2]
__version__='$Revision: 1.18 $'[11:-2]
from OFS.content_types import guess_content_type
from Globals import package_home
......@@ -100,4 +100,3 @@ class ImageFile(Acquisition.Explicit):
def __str__(self):
return '<img src="%s" alt="" />' % self.__name__
......@@ -13,9 +13,9 @@
"""Standard management interface support
$Id: Management.py,v 1.60 2002/04/12 19:45:33 Brian Exp $"""
$Id: Management.py,v 1.61 2002/08/14 21:31:40 mj Exp $"""
__version__='$Revision: 1.60 $'[11:-2]
__version__='$Revision: 1.61 $'[11:-2]
import sys, Globals, ExtensionClass, urllib
from Dialogs import MessageDialog
......
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Zope registerable permissions
$Id: Permission.py,v 1.7 2001/11/28 15:50:52 matt Exp $'''
__version__='$Revision: 1.7 $'[11:-2]
$Id: Permission.py,v 1.8 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.8 $'[11:-2]
import OFS.SimpleItem, Acquisition, Globals, ExtensionClass, AccessControl.Role
......@@ -89,4 +89,3 @@ class PermissionManager(ExtensionClass.Base):
self._setObject(id,i)
if REQUEST is not None:
return self.manage_main(self,REQUEST,update_menu=1)
......@@ -333,5 +333,3 @@ class ProductContext:
continue
ht=APIHelpTopic.APIHelpTopic(file, '', os.path.join(path, file))
self.registerHelpTopic(file, ht)
......@@ -175,5 +175,3 @@ class ProductRegistry(ProductRegistryMixin):
return setattr(self, name, v)
else:
raise AttributeError, name
......@@ -12,7 +12,7 @@
##############################################################################
'''
Functions for refreshing products.
$Id: RefreshFuncs.py,v 1.5 2002/06/16 01:56:00 shane Exp $
$Id: RefreshFuncs.py,v 1.6 2002/08/14 21:31:40 mj Exp $
'''
import os, sys
......@@ -329,4 +329,3 @@ def setupAutoRefresh(jar):
connection_open_hooks.append(autoRefresh)
# Init mod times.
checkAutoRefresh(jar)
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''short description
$Id: Undo.py,v 1.30 2002/02/08 18:58:23 andreasjung Exp $'''
__version__='$Revision: 1.30 $'[11:-2]
$Id: Undo.py,v 1.31 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.31 $'[11:-2]
import Globals, ExtensionClass
from DateTime import DateTime
......
......@@ -192,4 +192,3 @@ class DTMLFile(Bindings, Explicit, ClassicHTMLFile):
HTMLFile = ClassicHTMLFile
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Simple module for writing tar files
$Id: tar.py,v 1.5 2002/02/07 17:37:10 andreasjung Exp $'''
__version__='$Revision: 1.5 $'[11:-2]
$Id: tar.py,v 1.6 2002/08/14 21:31:41 mj Exp $'''
__version__='$Revision: 1.6 $'[11:-2]
import sys, time, zlib
try:
......
......@@ -73,4 +73,3 @@ def getZopeVersion():
"""
_prep_version_data()
return _zope_version
......@@ -12,7 +12,7 @@
##############################################################################
"""Encapsulation of date/time values"""
__version__='$Revision: 1.78 $'[11:-2]
__version__='$Revision: 1.79 $'[11:-2]
import re,sys, os, math, DateTimeZone
......@@ -1671,6 +1671,3 @@ class strftimeFormatter:
def Timezones():
"""Return the list of recognized timezone names"""
return _cache._zlst
# To run these tests, use:
# python unittest.py DateTime.tests.suite
......
......@@ -269,5 +269,3 @@ def trim_doc_string(text):
for line in lines[1:]:
nlines.append(line[min_indent:])
return '\n'.join(nlines)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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