Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ python:
- "3.6"
- "3.9"
- "3.10"
- "3.9-dev"
- "nightly"
- "3.11"

before_install:
# disable mongodb as we don't need it and it sometimes temporary fails
Expand All @@ -32,16 +31,15 @@ before_install:
jobs:
exclude:
- arch: ppc64le
python: "3.9"
python: "3.6"
- arch: ppc64le
python: "3.9-dev"
python: "3.10"
- arch: ppc64le
python: "nightly"
# Disable Python "3.9-dev" and "nightly" testing for AMD64, too.
python: "3.11"
- arch: amd64
python: "3.9-dev"
python: "3.9"
- arch: amd64
python: "nightly"
python: "3.11"

install:
- pip install coveralls pyfakefs
Expand Down
32 changes: 22 additions & 10 deletions common/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Back In Time
# Copyright (C) 2008-2022 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze
# Copyright (C) 2008-2022 Oprea Dan, Bart de Koning, Richard Bailey,
# Germar Reitze
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -15,6 +16,18 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

"""Configuration logic.

This module and its `Config` class contain the appliation logic handling the
configuration of Back In Time. The handling of the configuration file itself
is separated in the module :py:module:`configfile`.

Development notes:
Some of the methods have code comments starting with `#? ` instead of
`# `. These special comments are used to generate the manpage
`backintime-config`. The script `create-manpage-backintime-config.py`
parses this module for that.
"""

import os
import sys
Expand Down Expand Up @@ -445,13 +458,8 @@ def setSnapshotsPath(self, value, profile_id = None, mode = None):
return True

def snapshotsMode(self, profile_id=None):
"""Use mode (or backend) for this snapshot.

Look at 'man backintime' section 'Modes'.

Returns:
str: Possible values are local|local_encfs|ssh|ssh_encfs.
"""
#? Use mode (or backend) for this snapshot. Look at 'man backintime'
#? section 'Modes'.;local|local_encfs|ssh|ssh_encfs
return self.profileStrValue('snapshots.mode', 'local', profile_id)

def setSnapshotsMode(self, value, profile_id = None):
Expand Down Expand Up @@ -850,8 +858,12 @@ def setScheduleMode(self, value, profile_id = None):
self.setProfileIntValue('schedule.mode', value, profile_id)

def scheduleTime(self, profile_id = None):
#?What time the cronjob should run? Only valid for
#?\fIprofile<N>.schedule.mode\fR >= 20;0-24
#?Position-coded number with the format "hhmm" to specify the hour
#?and minute the cronjob should start (eg. 2015 means a quarter
#?past 8pm). Leading zeros can be omitted (eg. 30 = 0030).
#?Only valid for
#?\fIprofile<N>.schedule.mode\fR = 20 (daily), 30 (weekly),
#?40 (monthly) and 80 (yearly);0-2400
return self.profileIntValue('schedule.time', 0, profile_id)

def setScheduleTime(self, value, profile_id = None):
Expand Down
Loading