Fix indentation
This commit is contained in:
parent
3529f9c5f4
commit
4e726961ed
|
@ -1,14 +1,14 @@
|
||||||
import plugin, os.path, json
|
import plugin, os.path, json
|
||||||
|
|
||||||
def water(user):
|
def water(user):
|
||||||
try:
|
try:
|
||||||
with open(os.path.expanduser("~{}/.botany/visitors.json".format(user))) as f:
|
with open(os.path.expanduser("~{}/.botany/visitors.json".format(user))) as f:
|
||||||
visitors = json.load(f)
|
visitors = json.load(f)
|
||||||
visitors.append(dict(timestamp=int(time.time()),user="cosmicbot"))
|
visitors.append(dict(timestamp=int(time.time()),user="cosmicbot"))
|
||||||
with open(os.path.expanduser("~{}/.botany/visitors.json".format(user)),"w") as f:
|
with open(os.path.expanduser("~{}/.botany/visitors.json".format(user)),"w") as f:
|
||||||
json.dump(visitors,f,indent=2)
|
json.dump(visitors,f,indent=2)
|
||||||
return True # success
|
return True # success
|
||||||
except:
|
except:
|
||||||
return False # failed
|
return False # failed
|
||||||
|
|
||||||
@plugin.command("water")
|
@plugin.command("water")
|
||||||
|
|
Loading…
Reference in New Issue