projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ud-generate.8: fix some typoes
[mirror/userdir-ldap.git]
/
ud-sync-accounts-to-afs
diff --git
a/ud-sync-accounts-to-afs
b/ud-sync-accounts-to-afs
index
6ce93ef
..
1cc478b
100755
(executable)
--- a/
ud-sync-accounts-to-afs
+++ b/
ud-sync-accounts-to-afs
@@
-18,11
+18,10
@@
import sys
import tempfile
import tempfile
-import json
-if not '__author__' in json.__dict__:
- sys.stderr.write("Warning: This is probably the wrong json module. We want python 2.6's json\n")
- sys.stderr.write("module, or simplejson on python 2.5. Let's see if/how stuff blows up.\n")
+try:
import simplejson as json
import simplejson as json
+except ImportError:
+ import json # this better be pthon 2.6's json..
class UserEntries:
def __init__(self):
class UserEntries:
def __init__(self):
@@
-124,7
+123,7
@@
def filter_have(a):
if n == 'anonymous': # keep account, so remove from the have list
a.del_name(n)
continue
if n == 'anonymous': # keep account, so remove from the have list
a.del_name(n)
continue
- m = re.match('[0-9a-z]+$', n)
+ m = re.match('[0-9a-z
-
]+$', n)
if not m: # weird name, probably has dots like weasel.admin etc.
a.del_name(n)
continue
if not m: # weird name, probably has dots like weasel.admin etc.
a.del_name(n)
continue