diff --git a/lib_afc_s3storage/s3storage.py b/lib_afc_s3storage/s3storage.py index 892f354..5ae202f 100755 --- a/lib_afc_s3storage/s3storage.py +++ b/lib_afc_s3storage/s3storage.py @@ -101,8 +101,8 @@ class S3Storage: if filepathname is None: raise AFS3Error("S3Storage.upload_file(): missing required filepathname") - elif not os.path.exists(filepathname): - raise AFS3Error("S3Storage.upload_file(): invalid filepathname '%s'", filepathname) + if not os.path.exists(filepathname): + raise AFS3Error(f"S3Storage.upload_file(): invalid filepathname '{filepathname}'") if bucket is None: raise AFS3Error("S3Storage.upload_file(): missing required bucket name")