diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2020-01-14 16:30:30 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2020-01-15 15:04:27 +0100 |
commit | 7b04b43fe15ec95327a872f0ea83325fadf6840f (patch) | |
tree | a98a5cbeb140d528126250baa513f647f0375a40 /M2Crypto | |
parent | 6c2f44f5c362667bf129a8433eb6decec9de8195 (diff) | |
download | m2crypto-7b04b43fe15ec95327a872f0ea83325fadf6840f.tar.gz |
Add correct generated files
Diffstat (limited to 'M2Crypto')
-rw-r--r-- | M2Crypto/m2crypto.py | 108 |
1 files changed, 41 insertions, 67 deletions
diff --git a/M2Crypto/m2crypto.py b/M2Crypto/m2crypto.py index 6277ba5..9cad6f4 100644 --- a/M2Crypto/m2crypto.py +++ b/M2Crypto/m2crypto.py @@ -1,22 +1,13 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.12 +# Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. -from sys import version_info as _swig_python_version_info -if _swig_python_version_info >= (2, 7, 0): - def swig_import_helper(): - import importlib - pkg = __name__.rpartition('.')[0] - mname = '.'.join((pkg, '_m2crypto')).lstrip('.') - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module('_m2crypto') - _m2crypto = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): + + +from sys import version_info +if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp @@ -26,82 +17,62 @@ elif _swig_python_version_info >= (2, 6, 0): except ImportError: import _m2crypto return _m2crypto - try: - _mod = imp.load_module('_m2crypto', fp, pathname, description) - finally: - if fp is not None: + if fp is not None: + try: + _mod = imp.load_module('_m2crypto', fp, pathname, description) + finally: fp.close() - return _mod + return _mod _m2crypto = swig_import_helper() del swig_import_helper else: import _m2crypto -# pull in all the attributes from _m2crypto -if __name__.rpartition('.')[0] != '': - if _swig_python_version_info >= (2, 7, 0): - try: - from ._m2crypto import * - except ImportError: - from _m2crypto import * - else: - from _m2crypto import * -else: - from _m2crypto import * -del _swig_python_version_info - +del version_info +from _m2crypto import * try: _swig_property = property except NameError: - pass # Python < 2.2 doesn't have 'property'. - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if (name == "thisown"): - return self.this.own(value) + pass # Python < 2.2 doesn't have 'property'. +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) if (not static): - object.__setattr__(self, name, value) + self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr(self, class_type, name): - if (name == "thisown"): - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) - +def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError(name) def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) +try: + _object = object + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 + def _swig_setattr_nondynamic_method(set): - def set_attr(self, name, value): - if (name == "thisown"): - return self.this.own(value) - if hasattr(self, name) or (name == "this"): - set(self, name, value) + def set_attr(self,name,value): + if (name == "thisown"): return self.this.own(value) + if hasattr(self,name) or (name == "this"): + set(self,name,value) else: raise AttributeError("You cannot add attributes to %s" % self) return set_attr @@ -111,3 +82,6 @@ def _swig_setattr_nondynamic_method(set): + + + |