mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
fix IOError: [Errno 13] Permission denied
This commit is contained in:
parent
808e2ec6e9
commit
9c9be6b514
1 changed files with 12 additions and 0 deletions
|
@ -23,6 +23,16 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
|
||||
|
||||
def s_user(user):
|
||||
'''
|
||||
Check for root user
|
||||
'''
|
||||
if user != "root":
|
||||
print("\nslpkg: error: must have root privileges\n")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def remove_repositories(repositories, default_repositories):
|
||||
|
@ -84,6 +94,8 @@ class MetaData(object):
|
|||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
||||
s_user(getpass.getuser())
|
||||
|
||||
# Default Slackware release
|
||||
slack_rel = 'stable'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue