Commit 73b63a40 authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Import original constants instead of generated



Haskell to Python constant generation introduced duplicated constants
in Haskell.  This patch eliminates the duplication and fixes Haskell
to import the correct constants, instead of the generated ones.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent acf9af53
......@@ -26,6 +26,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 +288,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]
......
{-| Ganeti constants.
This module reexports the Haskell constants generated from Python.
This module reexports the Haskell constants and those generated from
Python.
-}
......@@ -25,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.Constants (module Ganeti.PyConstants) where
module Ganeti.Constants (module Ganeti.HsConstants,
module Ganeti.PyConstants) where
import Ganeti.HsConstants
import Ganeti.PyConstants
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment