Skip to content

Commit

Permalink
🚨 solve deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bunop committed Nov 27, 2023
1 parent 008d91f commit 533f4cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def callSnapshot(self):
# Don't redo a snapshot on the same item
if self.snapshot is not None:
logger.error("A snapshot is already defined for this domain")
logger.warn("Returning the current snapshot")
logger.warning("Returning the current snapshot")
return self.snapshot

# i need a xml file for the domain
Expand Down
4 changes: 2 additions & 2 deletions kvmBackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
def loadConf(file_conf):
"""A function to open a config file"""

config = yaml.load(open(file_conf))
config = yaml.load(open(file_conf), Loader=yaml.SafeLoader)

if not config:
raise RuntimeError(
Expand Down Expand Up @@ -346,4 +346,4 @@ def backup(domain, parameters, backupdir):
if flag_errors is False:
logger.info("'%s' completed successfully" % (prog_name))
else:
logger.warn("'%s' completed with error(s)" % (prog_name))
logger.warning("'%s' completed with error(s)" % (prog_name))

0 comments on commit 533f4cb

Please sign in to comment.