mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 16:24:16 +02:00
[commons] refactoring: 'user' module moved to 'api'
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api import user
|
||||
|
||||
CACHE_PATH = '{}/.cache/bauh'.format(str(Path.home()))
|
||||
CONFIG_PATH = '{}/.config/bauh'.format(str(Path.home()))
|
||||
USER_THEMES_PATH = '{}/.local/share/bauh/themes'.format(str(Path.home()))
|
||||
DESKTOP_ENTRIES_DIR = '{}/.local/share/applications'.format(str(Path.home()))
|
||||
TEMP_DIR = '/tmp/bauh{}'.format('_root' if os.getuid() == 0 else '')
|
||||
TEMP_DIR = '/tmp/bauh{}'.format('_root' if user.is_root() else '')
|
||||
|
||||
5
bauh/api/user.py
Normal file
5
bauh/api/user.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import os
|
||||
|
||||
|
||||
def is_root():
|
||||
return os.getuid() == 0
|
||||
Reference in New Issue
Block a user