Added CLI command for moving top-level nodes between projects.

Also introduces a slightly nicer way to get the database interface, and
an object-oriented way to allow dependency injection.
This commit is contained in:
2016-09-27 12:16:27 +02:00
parent c64fbf61ba
commit 407aefb9ad
8 changed files with 401 additions and 1 deletions

17
pillar/attrs_extra.py Normal file
View File

@@ -0,0 +1,17 @@
"""Extra functionality for attrs."""
import logging
import attr
def log(name):
"""Returns a logger attr.ib
:param name: name to pass to logging.getLogger()
:rtype: attr.ib
"""
return attr.ib(default=logging.getLogger(name),
repr=False,
hash=False,
cmp=False)