diff --git a/mktxp/cli/config/config.py b/mktxp/cli/config/config.py index e42f808..146fa02 100755 --- a/mktxp/cli/config/config.py +++ b/mktxp/cli/config/config.py @@ -112,7 +112,8 @@ class LinuxConfig(OSConfig): ''' @property def mktxp_user_dir_path(self): - return FSHelper.full_path('/etc/mktxp') + return FSHelper.full_path('~/mktxp') + #return FSHelper.full_path('/etc/mktxp') class MKTXPConfigHandler: diff --git a/mktxp/utils/utils.py b/mktxp/utils/utils.py index 6ae9104..bd56284 100755 --- a/mktxp/utils/utils.py +++ b/mktxp/utils/utils.py @@ -14,7 +14,6 @@ import os, sys, shlex, tempfile, shutil, re from datetime import timedelta import subprocess, hashlib -import keyring, getpass from collections import Iterable from contextlib import contextmanager @@ -178,55 +177,6 @@ class UniqueDirNamesChecker: break -class PasswordHandler: - ''' Password Helper - ''' - @staticmethod - def get_pwd_input(confirm = False): - ''' Gets password from command line - ''' - pwd = getpass.getpass('Enter password:') - if pwd and confirm: - pwd_confirm = getpass.getpass('Confirm password:') - if pwd != pwd_confirm: - print ("Passwords do not match") - return None - return pwd - - @classmethod - def get_pwd(cls, pwd_entry_name = None, confirm = False): - ''' Gets password from an OS-specific keyring or command line - ''' - pwd = None - new_pwd = False - - if pwd_entry_name: - pwd = keyring.get_password(pwd_entry_name, getpass.getuser()) - - if not pwd: - pwd = cls.get_pwd_input(confirm = confirm) - new_pwd = True - - return pwd, new_pwd - - @staticmethod - def store_pwd(pwd, pwd_entry_name): - ''' Store password into an OS-specific keyring - ''' - if not (pwd and pwd_entry_name): - return - keyring.set_password(pwd_entry_name, getpass.getuser(), pwd) - - @staticmethod - def delete_pwd(pwd_entry_name): - ''' Deletes password from an OS-specific keyring - ''' - if pwd_entry_name: - pwd = keyring.get_password(pwd_entry_name, getpass.getuser()) - if pwd: - keyring.delete_password(pwd_entry_name, getpass.getuser()) - - class UniquePartialMatchList(list): ''' Enables matching elements by unique "shortcuts" e.g: diff --git a/setup.py b/setup.py index 13fc017..914f4c3 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ with open(path.join(pkg_dir, 'README.md'), encoding='utf-8') as f: setup( name='mktxp', - version='0.16', + version='0.17', url='https://github.com/akpw/mktxp',