missing_default_face.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. diff -Naur ./mugshot-0.3.2.old/mugshot/MugshotWindow.py ./mugshot-0.3.2/mugshot/MugshotWindow.py
  2. --- ./mugshot-0.3.2.old/mugshot/MugshotWindow.py 2016-11-06 09:13:47.604768017 -0500
  3. +++ ./mugshot-0.3.2/mugshot/MugshotWindow.py 2016-11-06 09:14:11.431116827 -0500
  4. @@ -257,10 +257,11 @@
  5. logger.debug('Found profile image: %s' % str(image))
  6. if os.path.isfile(face):
  7. - if os.path.samefile(image, face):
  8. - self.updated_image = face
  9. - else:
  10. - self.updated_image = None
  11. + if os.path.exists(image):
  12. + if os.path.samefile(image, face):
  13. + self.updated_image = face
  14. + else:
  15. + self.updated_image = None
  16. self.set_user_image(face)
  17. elif os.path.isfile(image):
  18. self.updated_image = image
  19. @@ -612,7 +613,7 @@
  20. success = False
  21. logger.debug('Updating Office Phone...')
  22. -
  23. +
  24. command = "%s -w \"%s\" %s" % (chfn, office_phone, username)
  25. # Office phone is potentially handled by the -o flag in newer versions of chfn
  26. command2 = "%s -o \"%s\" %s" % (chfn, office_phone, username)