Compare commits

..

No commits in common. "e62a668f3efdbd08f3b382fa7a0bf7556258ef7e" and "eb889beee7c7cf388d8210f1c6ceb1690a965ce1" have entirely different histories.

4 changed files with 6 additions and 14 deletions

View File

@ -1,4 +1,4 @@
.TH SIMPLE_BACKUP 1 2025-03-30 SIMPLE_BACKUP 4.1.6 .TH SIMPLE_BACKUP 1 2023-06-15 SIMPLE_BACKUP 3.2.6
.SH NAME .SH NAME
simple_backup \- Backup files and folders using rsync simple_backup \- Backup files and folders using rsync
.SH SYNOPSIS .SH SYNOPSIS
@ -187,6 +187,6 @@ Bad configuration file.
.SH SEE ALSO .SH SEE ALSO
.BR rsync (1) .BR rsync (1)
.SH AUTHORS .SH AUTHORS
.MT https://git.shouldnt.work/fuxino .MT https://github.com/Fuxino
Daniele Fucini Daniele Fucini
.ME .ME

View File

@ -6,7 +6,7 @@ long_description = file: README.md
author = Daniele Fucini author = Daniele Fucini
author_email = dfucini@gmail.com author_email = dfucini@gmail.com
license = GPL3 license = GPL3
url = https://git.shouldnt.work/fuxino url = https://github.com/Fuxino/simple_backup
classifiers = classifiers =
Development Status :: 4 - Beta Development Status :: 4 - Beta
Environment :: Console Environment :: Console

View File

@ -1,3 +1,3 @@
"""Init.""" """Init."""
__version__ = '4.1.6' __version__ = '4.1.5'

View File

@ -679,10 +679,7 @@ def _read_config(config_file, user=None):
'numeric_ids': False} 'numeric_ids': False}
if not os.path.isfile(config_file): if not os.path.isfile(config_file):
if user is not None:
logger.warning('Config file %s does not exist', config_file) logger.warning('Config file %s does not exist', config_file)
else:
logger.warning('User not specified. Can\'t read configuration file')
return config_args return config_args
@ -796,12 +793,7 @@ def simple_backup():
if euid == 0: if euid == 0:
user = os.getenv('SUDO_USER') user = os.getenv('SUDO_USER')
if user is not None:
homedir = os.path.expanduser(f'~{user}') homedir = os.path.expanduser(f'~{user}')
else:
logger.warning('Failed to detect user. You can use -u/--user parameter to manually specify it')
homedir = None
else: else:
user = os.getenv('USER') user = os.getenv('USER')
homedir = os.getenv('HOME') homedir = os.getenv('HOME')