Commits

Aleš Erjavec committed a5fbbe6

Attempt to recreate the shelve dbm if importing the current implementation fails.

  • Participants
  • Parent commits 9cb115c

Comments (0)

Files changed (1)

File Orange/utils/addons.py

             if os.path.isfile(AOLIST_FILE):
                 os.remove(AOLIST_FILE)
             addons = shelve.open(AOLIST_FILE, 'n')
+    except ImportError:
+        if os.path.isfile(AOLIST_FILE):
+            os.remove(AOLIST_FILE)
+        addons = shelve.open(AOLIST_FILE, 'n')
     else:
         # Try to read the whole list and check for sanity.
         if any(name != name.lower() for name, _ in addons.items()):