projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improvement over the last path
[mirror/userdir-ldap.git]
/
UDLdap.py
diff --git
a/UDLdap.py
b/UDLdap.py
index
447368d
..
3dc2b74
100644
(file)
--- a/
UDLdap.py
+++ b/
UDLdap.py
@@
-1,5
+1,6
@@
import ldap
import time
import ldap
import time
+import userdir_ldap
class Account:
array_values = ['keyFingerPrint']
class Account:
array_values = ['keyFingerPrint']
@@
-62,6
+63,11
@@
class Account:
def numkeys(self):
return len(self['keyFingerPrint'])
def numkeys(self):
return len(self['keyFingerPrint'])
+ def latitude_dec(self, anonymized=False):
+ return userdir_ldap.DecDegree(self['latitude'], anonymized)
+ def longitude_dec(self, anonymized=False):
+ return userdir_ldap.DecDegree(self['longitude'], anonymized)
+
def verbose_status(self):
status = []
status.append('mail: %s' %(['disabled', 'active'][ self.has_mail() ]))
def verbose_status(self):
status = []
status.append('mail: %s' %(['disabled', 'active'][ self.has_mail() ]))