Commits

Pierre-Marie de Rodat committed 01a7097

presence*: fix login request result checking

  • Participants
  • Parent commits 66ae39c

Comments (0)

Files changed (2)

File presenced/pam_presenced.py

 
     # Request the login to Presencd and PresenceSync.
     failure_reason = prologin.presenced.connect().request_login(login)
-    if failure_reason:
+    if failure_reason is not None:
         # Login is forbidden by presenced.
         fail('Login forbidden: {}'.format(failure_reason))
 

File presenced/presenced.py

         result = self.application.presencesync.request_login(
             login, HOSTNAME
         )
-        if result:
+        if result is not None:
             self.set_status(423, 'Login refused')
             self.write(result)
         else: