removed pics.json

This commit is contained in:
ClF3 2024-04-30 08:43:00 +08:00
parent c8d1d274cd
commit af350028fd
2 changed files with 2 additions and 9 deletions

File diff suppressed because one or more lines are too long

10
sync.py
View File

@ -14,8 +14,6 @@ parser.add_argument('--ignore', help='Files to ignore', default=defaults['ignore
parser.add_argument('--overwrite', help='Overwrite existing images', action='store_true')
args=parser.parse_args()
pics=[]
if args.remote!='' and args.remote[-1] != '/':
args.remote += '/'
@ -28,7 +26,6 @@ try:
for root,fir,files in os.walk(args.local):
for file in files:
pics.append(file)
if file in args.ignore:
print("ignored: " + file)
continue
@ -37,7 +34,7 @@ try:
print("Overwriting: " + file)
blob_client = blob_service_client.get_blob_client(container=args.container, blob=args.remote+file)
blob_client.delete_blob()
else:
else:
print("skipped: " + file)
continue
try:
@ -53,7 +50,4 @@ try:
except Exception as ex:
print('Exception:')
print(ex)
finally:
json.dump(pics, open('pics.json', 'w'))
print(ex)