[fix] Depreciation warning for --hooks was always shown (#333)

This commit is contained in:
Alexandre Aubin 2017-07-23 01:56:05 +02:00 committed by GitHub
parent c5098cd90e
commit 3afbf0f7b9

View file

@ -2093,7 +2093,7 @@ def backup_restore(auth, name,
logger.warning("--ignore-hooks is deprecated and will be removed in the"
"future. Please use --ignore-system instead.")
ignore_system = ignore_hooks
if hooks != []:
if hooks != [] and hooks is not None:
logger.warning("--hooks is deprecated and will be removed in the"
"future. Please use --system instead.")
system = hooks