ud-mailgate: remove exception for münchen.debian.net
[mirror/userdir-ldap.git] / ud-replicated
index 747c334..dd58a24 100755 (executable)
@@ -88,7 +88,7 @@ def do_replicate(message):
         timestamp = message.get('timestamp', last_update)
         message   = message.get('message', 'update required')
     LOG.debug("Got message at %s: %s" % (last_update, message))
-    if last_run > timestamp, last_update):
+    if last_run > timestamp:
         return
 
     command = ['/usr/bin/ud-replicate']
@@ -104,7 +104,8 @@ def do_replicate(message):
         else:
             LOG.debug('%s finished with ret: 0' % ' '.join(command))
         finally:
-            os.environ['TERM'] = old_term
+            if old_term is not None:
+                os.environ['TERM'] = old_term
     last_run = last_update
 
 def main():