Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Commit

Permalink
- new gitignore to fit pybuilder project
Browse files Browse the repository at this point in the history
- falke8
  • Loading branch information
Domme, Sergej committed Sep 10, 2015
1 parent d13c28d commit cd6cfd8
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 13 deletions.
68 changes: 57 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,57 @@
*.egg-info
/.project
/.pydevproject
/dist
/build
/deb_dist
*.pyc
*~

# virtual environment
ve*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
7 changes: 5 additions & 2 deletions src/main/python/yamlreader/yamlreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
import os
import logging


class NoDefault(object):
def __str__(self):
return "No default data"


NO_DEFAULT = NoDefault()


class YamlReaderError(Exception):
pass

Expand All @@ -27,7 +29,7 @@ def data_merge(a, b):
# ## debug output
# sys.stderr.write("DEBUG: %s to %s\n" %(b,a))
try:
if a is None or isinstance(a, str) or isinstance(a, unicode) or isinstance(a, int) or isinstance(a, long) or isinstance(a, float):
if a is None or isinstance(a, (str, unicode, int, long, float)):
# border case for first run or if a is a primitive
a = b
elif isinstance(a, list):
Expand Down Expand Up @@ -122,7 +124,8 @@ def __main():
description="Merge YAML data from given files, dir or file glob",
version="%" + "prog %s" % __version__,
prog="yamlreader")
parser.add_option("--debug", dest="debug", action="store_true", default=False, help="Enable debug logging [%default]")
parser.add_option("--debug", dest="debug", action="store_true", default=False,
help="Enable debug logging [%default]")
options, args = parser.parse_args()
if options.debug:
logger = logging.getLogger()
Expand Down

0 comments on commit cd6cfd8

Please sign in to comment.