share manager
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
import hashlib,argparse,json,sys
|
||||
import hashlib,argparse,json,sys,os
|
||||
from datetime import datetime
|
||||
from shutil import copyfile
|
||||
|
||||
@@ -51,7 +51,10 @@ if opts.expire:
|
||||
})
|
||||
|
||||
if opts.shares:
|
||||
shares = json.load(open(opts.shares,'rt'))
|
||||
if os.path.exists(opts.shares):
|
||||
shares = json.load(open(opts.shares,'rt'))
|
||||
else:
|
||||
shares = []
|
||||
shares.append(share)
|
||||
if opts.insert:
|
||||
print("creating backup %s"%(opts.shares+".bkp",))
|
||||
|
||||
Reference in New Issue
Block a user