[root button gnome org: Cron <root button> run-parts /etc/cron.daily]
- From: Olav Vitters <olav vitters nl>
- To: gnome-infrastructure gnome org
- Subject: [root button gnome org: Cron <root@button> run-parts /etc/cron.daily]
- Date: Wed, 2 Feb 2011 15:29:05 +0100
Could anyone with some Python knowledge look into the following scripts
(sysadmin-bin module, visible to all):
- texttable.py
- handle-ldap-modules
It is called like:
# handle-ldap-modules sync
Problem is the handling of encoded data. Script works from the command
line, but not not from cron.
Likely: Command line setup as UTF-8, Cron is not.
How can I solve this? I rather just dump everything to stdout as binary
and ignore if it is UTF-8 or not. But would still appreciate a good fix.
Note: Ideally I'd like to see a nicely formatted output in my mail
reader and from cron (so mail should be sent as utf-8).
And some background info: It puts information from damned-lies
(translation coordinators) as well as maintainers (doap files in
git.gnome.org) in LDAP so the Mango scripts can use that.
If you look at the history of texttable.py you'll notice that I've made
various changes to ensure the encoding was working properly from the
command line. I'm guessing something in texttable.py still needs
changing. Not sure though, perhaps the fault is in handle-ldap-modules.
Unfortunately, running this script locally won't work (depends on GNOME
infra).
--
Regards,
Olav
PS: Slightly redacted the fwded email (XXX).
--- Begin Message ---
- From: root button gnome org (Cron Daemon)
- To: root button gnome org
- Subject: Cron <root@button> run-parts /etc/cron.daily
- Date: Wed, 2 Feb 2011 04:03:07 +0000 (UTC)
/etc/cron.daily/sync-mango:
Invalid uids:
UID DOAP email LDAP email DOAP name Modules
root gnome-sysadmin gnome org ??? GNOME sysadmin team mhonarc, sysadmin-bin
ssickert XXXXXXXXXXXXXXXXX ??? XXXXXXXXXXXXXXX gnome-sharing-service
Mismatch between email addresses (DOAP vs LDAP):
Traceback (most recent call last):
File "/home/admin/bin/handle-ldap-modules", line 608, in ?
print_invalid(INVALID, True, "Mismatch between email addresses (DOAP vs LDAP):")
File "/home/admin/bin/handle-ldap-modules", line 566, in print_invalid
print table.draw()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1573: ordinal not in range(128)
--- End Message ---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]