mirror of https://gitlab.com/bashrc2/epicyon
Only write if file does not exist
parent
d6a17f1209
commit
b877af4ae8
11
shares.py
11
shares.py
|
@ -146,11 +146,12 @@ def addShare(baseDir: str, \
|
|||
|
||||
# indicate that a new share is available
|
||||
newShareFile=baseDir+'/accounts/.newShare'
|
||||
try:
|
||||
with open(newShareFile, 'w') as fp:
|
||||
fp.write('\n')
|
||||
except:
|
||||
pass
|
||||
if not os.path.isfile(newShareFile):
|
||||
try:
|
||||
with open(newShareFile, 'w') as fp:
|
||||
fp.write('\n')
|
||||
except:
|
||||
pass
|
||||
|
||||
def expireShares(baseDir: str) -> None:
|
||||
"""Removes expired items from shares
|
||||
|
|
Loading…
Reference in New Issue