Skip to content

Commit

Permalink
Fix deb version of PAM all caps naming
Browse files Browse the repository at this point in the history
When this module was transitioned from pip (0.1.4) to deb (0.4.2-13.1),
the version in Raspbian contained an uppercase name for the module.
This method of importing fixes this and accounts for the pkg being
fixed in the future to be lowercase.
  • Loading branch information
radujipa committed Mar 14, 2018
1 parent cfb5215 commit e9aa035
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions kano_settings/system/account.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
#!/usr/bin/env python

# account.py
#
# Copyright (C) 2014 Kano Computing Ltd.
# Copyright (C) 2014-2018 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#
# Contains the account screen backend functions


import os
import pam
from kano.utils import get_user_unsudoed, run_cmd

# When this module was transitioned from pip (0.1.4) to deb (0.4.2-13.1), the
# version in Raspbian contained an all caps name for the module.
try:
import PAM as pam
except ImportError:
import pam

from kano.utils import run_cmd
from kano_world.functions import has_token


Expand Down

0 comments on commit e9aa035

Please sign in to comment.