weakref.py - name "self" ist not defined

  • I tried to apply some changes to weakref.py according to


    omv 4?



    unfortunately i am ending with followig traceback error:


    Traceback (most recent call last):
    File "/usr/lib/python3.5/functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
    File "/usr/lib/python3.5/weakref.py", line 90, in <module>
    class WeakValueDictionary(collections.MutableMapping):
    File "/usr/lib/python3.5/weakref.py", line 109, in WeakValueDictionary
    def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
    NameError: name 'self' is not defined


    Could someone be so kind to copy line 105 to 120 of weakref.py to this thread.



    Thanks in advance and
    regards Holgah


    OMV 4.0.6

    OMV 4.0.6-1 (Arrakis) | 64bit | Linux 4.12.0-0.bpo.2-amd64 |OMV-Extras.org 4.1.0

    Plugins: minidlna | virtualbox | cups | shellinabox | usbbackup

  • Here you are:



    Next time keep a backup before editing


    Indentation error or mix of space and tap?


    Python requires strict indentation rules an only spaces

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thanks a lot.


    @Zoki I hope I have my lesson learned. Problems starte with intendations.

    OMV 4.0.6-1 (Arrakis) | 64bit | Linux 4.12.0-0.bpo.2-amd64 |OMV-Extras.org 4.1.0

    Plugins: minidlna | virtualbox | cups | shellinabox | usbbackup

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!