diff --git a/gestion/darcs_send_changes.py b/gestion/darcs_send_changes.py index ea7c35c2..3689a965 100755 --- a/gestion/darcs_send_changes.py +++ b/gestion/darcs_send_changes.py @@ -5,7 +5,7 @@ # --------------------- # # Copyright (C) 2007 Jeremie Dimino -# Copyright (C) 2007 Nicolas Dandrimont +# Copyright (C) 2007,2008 Nicolas Dandrimont # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,10 +30,13 @@ import commands, os, sys, email try: from lxml import etree -except: - sys.stderr.write("darcs_send_changes requiert le paquet python-lxml.\n") - sys.stderr.flush() - sys.exit(1) +except ImportError: + try: + import cElementTree as etree + except ImportError: + sys.stderr.write("darcs_send_changes requiert python-lxml ou cElementTree.\n") + sys.stderr.flush() + sys.exit(1) sys.path.append("/usr/scripts/gestion") from affich_tools import cprint, encoding