Bucket details missing on delete_file_version()
Closed this issue · 1 comments
Ghost93 commented
Hi,
When I call delete_file_version(file_name,file_id) an error is thrown:
file_info = b2_client.get_file_info_by_name(file_name=file_name, bucket_name=my_bucket)
response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
print response
The error:
File "/home/shmuel/workspace/***/***/my_script.py", line 135, in foo
client.remove_file(location)
File "/home/shmuel/workspace/***/***/b2/B2Client.py", line 29, in remove_file
response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
File "/usr/local/lib/python2.7/dist-packages/backblazeb2/backblazeb2.py", line 357, in delete_file_version
bucket = self.get_bucket_info(bucket_id=bucket_id,
NameError: global name 'bucket_id' is not defined
Seems like bucket details are not passed to this function.
I think I can fix that, but in the meantime I'm opening this issue.