Python autotool to print socket constants
[ganeti-local] / autotools / convert-constants
index 7304ddb..421d3d4 100755 (executable)
@@ -25,7 +25,7 @@
 import re
 import types
 
-from ganeti import _autoconf
+from ganeti import _constants
 from ganeti import compat
 from ganeti import constants
 from ganeti import errors
@@ -287,7 +287,9 @@ def Convert(module, prefix):
   """
   lines = [""]
 
-  all_items = dict((name, getattr(module, name)) for name in dir(module))
+  all_items = dict((name, getattr(module, name))
+                   for name in dir(module)
+                   if name not in dir(_constants))
 
   for name in sorted(all_items.keys()):
     value = all_items[name]
@@ -303,7 +305,6 @@ def main():
   print Convert(constants, "")
   print Convert(luxi, "luxi")
   print Convert(qlang, "qlang")
-  print Convert(_autoconf, "autoconf")
   print Convert(errors, "errors")
   print Convert(jstore, "jstore")