選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

19 行
501 B

  1. # -*- coding: utf-8 -*-
  2. from __future__ import (absolute_import, division, print_function,
  3. unicode_literals)
  4. from functools import partial
  5. from redis import Redis
  6. def fix_return_type(func):
  7. # deliberately no functools.wraps() call here, since the function being
  8. # wrapped is a partial, which has no module
  9. def _inner(*args, **kwargs):
  10. value = func(*args, **kwargs)
  11. if value is None:
  12. value = -1
  13. return value
  14. return _inner