Merge branch 'release/0.5.1' into production

* release/0.5.1:
  update docs version, add release to changelog
  reverted Reject handling in ldaptasks
This commit is contained in:
Jan Dittberner 2015-01-29 18:44:49 +01:00
commit 94cf918bac
3 changed files with 7 additions and 9 deletions

View file

@ -1,7 +1,10 @@
Changelog Changelog
========= =========
* release:`0.5.0 <2015-01-29>` * :release:`0.5.1 <2015-01-29>`
* :bug:`-` reverted Reject handling in ldaptasks
* :release:`0.5.0 <2015-01-29>`
* :feature:`-` improved logging of ldaptasks * :feature:`-` improved logging of ldaptasks
* :support:`-` update bpython to 0.13.2, add explicit dependency on requests * :support:`-` update bpython to 0.13.2, add explicit dependency on requests
2.5.1 2.5.1

View file

@ -62,7 +62,7 @@ copyright = u'2014, 2015 Jan Dittberner'
# The short X.Y version. # The short X.Y version.
version = '0.5' version = '0.5'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.5.0' release = '0.5.1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View file

@ -21,12 +21,6 @@ from ldapentities.models import (
_LOGGER = get_task_logger(__name__) _LOGGER = get_task_logger(__name__)
def log_and_reject(exception, message, *args):
logargs = list(args) + [exception.returncode, exception.output]
_LOGGER.error(message + "\nreturncode: %d\noutput:\n%s", *logargs)
raise Reject(message % args, requeue=False)
@shared_task @shared_task
def create_ldap_group(groupname, gid, descr): def create_ldap_group(groupname, gid, descr):
""" """
@ -91,7 +85,8 @@ def create_ldap_user(username, uid, gid, gecos, homedir, shell, password):
try: try:
ldapgroup = LdapGroup.objects.get(gid=gid) ldapgroup = LdapGroup.objects.get(gid=gid)
except ObjectDoesNotExist as exc: except ObjectDoesNotExist as exc:
log_and_reject(exc, 'LDAP group with gid %d does not exist', gid) _LOGGER.error('LDAP group with gid %d does not exist', gid)
raise Reject(exc, requeue=False)
ldapuser.uid = uid ldapuser.uid = uid
ldapuser.group = gid ldapuser.group = gid
ldapuser.gecos = gecos ldapuser.gecos = gecos