File: common.py

package info (click to toggle)
zope-atcontenttypes 0.2-rc3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 904 kB
  • ctags: 1,360
  • sloc: python: 5,719; sh: 64; makefile: 38
file content (49 lines) | stat: -rw-r--r-- 1,431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""Migration tools for ATContentTypes

Migration system for the migration from CMFDefault/Event types to archetypes
based CMFPloneTypes (http://sf.net/projects/collective/).

Copyright (c) 2004, Christian Heimes and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of its contributors may be used
   to endorse or promote products derived from this software without specific
   prior written permission.

$Id: common.py,v 1.4 2004/07/13 13:12:55 dreamcatcher Exp $
"""

from Products.Archetypes.debug import log as at_log

try:
    dummy = True
except:
    True=1
    False=0

DEBUG      = False
REMOVE_OLD = True

def LOG(logmessage):
    """ wrap archetypes log method
    """

    if DEBUG:
        at_log(logmessage)

## LinguaPlone addon?
try:
    from Products.LinguaPlone.public import registerType
except ImportError:
    HAS_LINGUA_PLONE = False
else:
    HAS_LINGUA_PLONE = True
    del registerType