@staticmethod
    def get_descriptor(file_input):
        try:
            # Is it a file like object?
            file_input.seek(0)
        except __HOLE__:
            # If not, try open it.
            return open(file_input, 'rb')
        else:
            return file_input
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/django_gpg/api.py/GPG.get_descriptor