[gestion/darcs_send_changes] Utilisation de cElementTree pour ragnarok

darcs-hash:20090110140136-ffbb2-85460af2f8981c3a6bc713da283f43c683c3ec69.gz
This commit is contained in:
Nicolas Dandrimont 2009-01-10 15:01:36 +01:00
parent 83c0272d2c
commit 733e2d5e69

View file

@ -5,7 +5,7 @@
# ---------------------
#
# Copyright (C) 2007 Jeremie Dimino <jeremie@dimino.org>
# Copyright (C) 2007 Nicolas Dandrimont <Nicolas.Dandrimont@crans.org>
# Copyright (C) 2007,2008 Nicolas Dandrimont <Nicolas.Dandrimont@crans.org>
#
# 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