removed pics.json
This commit is contained in:
parent
c8d1d274cd
commit
af350028fd
10
sync.py
10
sync.py
|
@ -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')
|
parser.add_argument('--overwrite', help='Overwrite existing images', action='store_true')
|
||||||
args=parser.parse_args()
|
args=parser.parse_args()
|
||||||
|
|
||||||
pics=[]
|
|
||||||
|
|
||||||
if args.remote!='' and args.remote[-1] != '/':
|
if args.remote!='' and args.remote[-1] != '/':
|
||||||
args.remote += '/'
|
args.remote += '/'
|
||||||
|
|
||||||
|
@ -28,7 +26,6 @@ try:
|
||||||
|
|
||||||
for root,fir,files in os.walk(args.local):
|
for root,fir,files in os.walk(args.local):
|
||||||
for file in files:
|
for file in files:
|
||||||
pics.append(file)
|
|
||||||
if file in args.ignore:
|
if file in args.ignore:
|
||||||
print("ignored: " + file)
|
print("ignored: " + file)
|
||||||
continue
|
continue
|
||||||
|
@ -37,7 +34,7 @@ try:
|
||||||
print("Overwriting: " + file)
|
print("Overwriting: " + file)
|
||||||
blob_client = blob_service_client.get_blob_client(container=args.container, blob=args.remote+file)
|
blob_client = blob_service_client.get_blob_client(container=args.container, blob=args.remote+file)
|
||||||
blob_client.delete_blob()
|
blob_client.delete_blob()
|
||||||
else:
|
else:
|
||||||
print("skipped: " + file)
|
print("skipped: " + file)
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
@ -53,7 +50,4 @@ try:
|
||||||
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print('Exception:')
|
print('Exception:')
|
||||||
print(ex)
|
print(ex)
|
||||||
|
|
||||||
finally:
|
|
||||||
json.dump(pics, open('pics.json', 'w'))
|
|
Loading…
Reference in New Issue