[Checkins] SVN: megrok.icon/trunk/src/megrok/icon/registry.py some small fixes

Christian Klinger cklinger at novareto.de
Wed Jun 23 10:13:27 EDT 2010


Log message for revision 113782:
  some small fixes

Changed:
  U   megrok.icon/trunk/src/megrok/icon/registry.py

-=-
Modified: megrok.icon/trunk/src/megrok/icon/registry.py
===================================================================
--- megrok.icon/trunk/src/megrok/icon/registry.py	2010-06-23 13:07:30 UTC (rev 113781)
+++ megrok.icon/trunk/src/megrok/icon/registry.py	2010-06-23 14:13:27 UTC (rev 113782)
@@ -2,6 +2,7 @@
 
 import os
 import mimetypes
+import inspect
 from grokcore import view, component as grok
 from megrok.icon import log, ICONS_BASES
 from megrok.icon.interfaces import IIcon, IIconRegistry, IIconRegistryStorage
@@ -56,7 +57,7 @@
 
     def populate(self, path):
         if not os.path.isdir(path):
-            path = os.path.join(os.path.dirname(__file__), path)
+            path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), path)
             if not os.path.isdir(path):
                 raise NotImplementedError
 
@@ -65,7 +66,8 @@
                 ipath = os.path.join(root, name)
                 iname = os.path.splitext(name)[0]
                 self.add(iname, ipath)
-            dirs.remove('.svn')
+            if '.svn' in dirs:
+                dirs.remove('.svn')
 
     def registered(self, name):
         return name in self.registry



More information about the checkins mailing list