]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cloud: Fix #9366 type out and err as str rather that bytes
authornorbert.bizet <norbert.bizet@baculasystems.com>
Wed, 27 Jul 2022 14:53:39 +0000 (10:53 -0400)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
bacula/scripts/aws_cloud_driver.in

index f9a6d27fa90531d074c6753dba0fe3a85f5617e4..e63d7ab1376d93ae9371d4f6eb4a0cd9e8458f04 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python2
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*- 
 
 #  Bacula® - The Network Backup Solution
 
@@ -108,7 +108,7 @@ def download():
    try:
       logging.info("enter download")
       proc = Popen(["aws", "s3", "cp",
-            os.path.join(cloud_path, volume, part), "-", "--only-show-errors"], stderr=PIPE)
+            os.path.join(cloud_path, volume, part), "-", "--only-show-errors"], stderr=PIPE, universal_newlines=True)
       output,err = proc.communicate()
       logging.debug("download proc communicate output:{0} , err:{1}".format(output,err))
       if err and err.find("An error occurred (InvalidObjectState) when calling the GetObject operation") != -1: