On 04/21/2015 10:18 AM, Thomas De Schampheleire wrote:
On Tue, Apr 21, 2015 at 3:05 PM, Mads Kiilerich <[email protected]> wrote:
On 04/21/2015 06:34 AM, Thomas De Schampheleire wrote:

+import imp
   import logging
   import kallithea
   import platform
@@ -43,12 +45,25 @@ from kallithea.model.scm import ScmModel
   log = logging.getLogger(__name__)


+def load_hacks():
+    """
+    Load hacks - python files dropped in kallithea/hacks that will
monkeypatch
+    Kallithea internals
+    """
+    hacksdir = os.path.dirname(__file__) + '/../hacks'
This should better be

hacksdir = os.path.join(os.path.dirname(__file__), os.pardir, 'hacks')

More verbose, yes, but will it really be better? It is less readable to me.

This is supposed to be more cross-platform. For example, will the
forward slashes work on Windows?

In general: Yes.

/Mads
_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to