]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/extensions.py
lotsa files
[dak.git] / daklib / extensions.py
old mode 100644 (file)
new mode 100755 (executable)
index d5da89d..668cc27
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Utility functions for extensions
+""" Utility functions for extensions """
 # Copyright (C) 2008 Anthony Towns <ajt@dbeian.org>
 
 ################################################################################
@@ -37,10 +37,10 @@ def replace_dak_function(module,name):
         myfunc.__doc__ = f.__doc__
         myfunc.__dict__.update(f.__dict__)
 
-       fnname = "%s:%s" % (module, name)
-       if fnname in dak_functions_to_replace:
-           raise Exception, \
-               "%s in %s already marked to be replaced" % (name, module)
+        fnname = "%s:%s" % (module, name)
+        if fnname in dak_functions_to_replace:
+            raise Exception, \
+                "%s in %s already marked to be replaced" % (name, module)
         dak_functions_to_replace["%s:%s" % (module,name)] = myfunc
         return f
     return x
@@ -57,5 +57,3 @@ def init(name, module, userext):
         if len(f) > 0 and m == name:
             dak_replaced_functions[f] = module.__dict__[f]
             module.__dict__[f] = newfunc
-
-