Ticket #4920: initgroups.patch

File initgroups.patch, 579 bytes (added by vperic, 3 years ago)
  • twisted/python/util.py

    diff --git twisted/python/util.py twisted/python/util.py
    index ee4cc8a..2c7529f 100644
    class FancyEqMixin: 
    561561        return not result 
    562562 
    563563 
    564  
    565564try: 
    566     from twisted.python._initgroups import initgroups as _c_initgroups 
    567 except ImportError: 
    568     _c_initgroups = None 
     565    from os import initgroups as _c_initgroups 
     566except ImportError: # Python 2.6 or lower 
     567    try: 
     568        from twisted.python._initgroups import initgroups as _c_initgroups 
     569    except ImportError: 
     570        _c_initgroups = None 
    569571 
    570572 
    571573