"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "roundup/init.py" between
roundup-1.6.1.tar.gz and roundup-2.0.0.tar.gz

About: Roundup is an highly customisable issue-tracking system with command-line, web and e-mail interfaces (written in Python).

init.py  (roundup-1.6.1):init.py  (roundup-2.0.0)
skipping to change at line 20 skipping to change at line 20
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# #
# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
# #
"""Init (create) a roundup instance. """Init (create) a roundup instance.
""" """
from __future__ import print_function
__docformat__ = 'restructuredtext' __docformat__ = 'restructuredtext'
import os, errno, email.parser import os, errno, email.parser
from roundup import install_util, password from roundup import install_util
from roundup.configuration import CoreConfig from roundup.configuration import CoreConfig
from roundup.i18n import _ from roundup.i18n import _
def copytree(src, dst, symlinks=0): def copytree(src, dst, symlinks=0):
"""Recursively copy a directory tree using copyDigestedFile(). """Recursively copy a directory tree using copyDigestedFile().
The destination directory is allowed to exist. The destination directory is allowed to exist.
If the optional symlinks flag is true, symbolic links in the If the optional symlinks flag is true, symbolic links in the
source tree result in symbolic links in the destination tree; if source tree result in symbolic links in the destination tree; if
skipping to change at line 46 skipping to change at line 47
links are copied. links are copied.
This was copied from shutil.py in std lib. This was copied from shutil.py in std lib.
""" """
# Prevent 'hidden' files (those starting with '.') from being considered. # Prevent 'hidden' files (those starting with '.') from being considered.
names = [f for f in os.listdir(src) if not f.startswith('.')] names = [f for f in os.listdir(src) if not f.startswith('.')]
try: try:
os.mkdir(dst) os.mkdir(dst)
except OSError as error: except OSError as error:
if error.errno != errno.EEXIST: raise if error.errno != errno.EEXIST: raise # noqa
for name in names: for name in names:
srcname = os.path.join(src, name) srcname = os.path.join(src, name)
dstname = os.path.join(dst, name) dstname = os.path.join(dst, name)
if symlinks and os.path.islink(srcname): if symlinks and os.path.islink(srcname):
linkto = os.readlink(srcname) linkto = os.readlink(srcname)
os.symlink(linkto, dstname) os.symlink(linkto, dstname)
elif os.path.isdir(srcname): elif os.path.isdir(srcname):
copytree(srcname, dstname, symlinks) copytree(srcname, dstname, symlinks)
else: else:
install_util.copyDigestedFile(srcname, dstname) install_util.copyDigestedFile(srcname, dstname)
skipping to change at line 133 skipping to change at line 134
''' Attempt to load a Roundup template from the indicated directory. ''' Attempt to load a Roundup template from the indicated directory.
Return None if there's no template, otherwise a template info Return None if there's no template, otherwise a template info
dictionary. dictionary.
''' '''
tif = os.path.join(path, 'TEMPLATE-INFO.txt') tif = os.path.join(path, 'TEMPLATE-INFO.txt')
if not os.path.exists(tif): if not os.path.exists(tif):
return None return None
if os.path.exists(os.path.join(path, 'config.py')): if os.path.exists(os.path.join(path, 'config.py')):
print _("WARNING: directory '%s'\n" print(_("WARNING: directory '%s'\n"
"\tcontains old-style template - ignored" "\tcontains old-style template - ignored")
) % os.path.abspath(path) % os.path.abspath(path))
return None return None
# load up the template's information # load up the template's information
try: try:
f = open(tif) f = open(tif)
m = email.parser.Parser().parse(f, True) m = email.parser.Parser().parse(f, True)
ti = {} ti = {}
ti['name'] = m['name'] ti['name'] = m['name']
ti['description'] = m['description'] ti['description'] = m['description']
ti['intended-for'] = m['intended-for'] ti['intended-for'] = m['intended-for']
 End of changes. 4 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)