forked from indymedia/epicyon
Less indentation
parent
4cef99cb55
commit
3e5ff202e6
23
shares.py
23
shares.py
|
@ -174,17 +174,18 @@ def addShare(baseDir: str,
|
||||||
# indicate that a new share is available
|
# indicate that a new share is available
|
||||||
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
|
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
|
||||||
for handle in dirs:
|
for handle in dirs:
|
||||||
if '@' in handle:
|
if '@' not in handle:
|
||||||
accountDir = baseDir + '/accounts/' + handle
|
continue
|
||||||
newShareFile = accountDir + '/.newShare'
|
accountDir = baseDir + '/accounts/' + handle
|
||||||
if not os.path.isfile(newShareFile):
|
newShareFile = accountDir + '/.newShare'
|
||||||
nickname = handle.split('@')[0]
|
if not os.path.isfile(newShareFile):
|
||||||
try:
|
nickname = handle.split('@')[0]
|
||||||
with open(newShareFile, 'w') as fp:
|
try:
|
||||||
fp.write(httpPrefix + '://' + domainFull +
|
with open(newShareFile, 'w') as fp:
|
||||||
'/users/' + nickname + '/tlshares')
|
fp.write(httpPrefix + '://' + domainFull +
|
||||||
except BaseException:
|
'/users/' + nickname + '/tlshares')
|
||||||
pass
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def expireShares(baseDir: str) -> None:
|
def expireShares(baseDir: str) -> None:
|
||||||
|
|
Loading…
Reference in New Issue