mirror of https://github.com/borgbase/vorta
flake8: fix W503
This commit is contained in:
parent
e02b241762
commit
9b24a1161b
|
@ -63,7 +63,7 @@ filterwarnings =
|
|||
source = src
|
||||
|
||||
[flake8]
|
||||
ignore = W503
|
||||
ignore =
|
||||
max-line-length = 120
|
||||
exclude = build,dist,.git,.idea,.cache,.tox,.eggs
|
||||
|
||||
|
|
|
@ -63,9 +63,13 @@ class BorgCreateThread(BorgThread):
|
|||
current_wifi = get_current_wifi()
|
||||
if current_wifi is not None:
|
||||
wifi_is_disallowed = WifiSettingModel.select().where(
|
||||
(WifiSettingModel.ssid == current_wifi)
|
||||
& (WifiSettingModel.allowed is False)
|
||||
& (WifiSettingModel.profile == profile.id)
|
||||
(
|
||||
WifiSettingModel.ssid == current_wifi
|
||||
) & (
|
||||
WifiSettingModel.allowed is False
|
||||
) & (
|
||||
WifiSettingModel.profile == profile.id
|
||||
)
|
||||
)
|
||||
if wifi_is_disallowed.count() > 0 and profile.repo.is_remote_repo():
|
||||
ret['message'] = 'Current Wifi is not allowed.'
|
||||
|
|
|
@ -113,9 +113,13 @@ class VortaScheduler(QtScheduler):
|
|||
|
||||
validation_cutoff = date.today() - timedelta(days=7 * profile.validation_weeks)
|
||||
recent_validations = EventLogModel.select().where(
|
||||
(EventLogModel.subcommand == 'check')
|
||||
& (EventLogModel.start_time > validation_cutoff)
|
||||
& (EventLogModel.repo_url == profile.repo.url)
|
||||
(
|
||||
EventLogModel.subcommand == 'check'
|
||||
) & (
|
||||
EventLogModel.start_time > validation_cutoff
|
||||
) & (
|
||||
EventLogModel.repo_url == profile.repo.url
|
||||
)
|
||||
).count()
|
||||
if profile.validation_on and recent_validations == 0:
|
||||
msg = BorgCheckThread.prepare(profile)
|
||||
|
|
Loading…
Reference in New Issue