User:Lowercase sigmabot II/Source.py: Difference between revisions

Content deleted Content added
Updating source) (bot
Updating source) (bot
Line 1:
 
Source as of 22:2533, 1 May 2012 (UTC).
 
== Sandbot1.py ==
Line 133:
sandboxes = ("Wikipedia:Sandbox", "Wikipedia:Tutorial/Editing/sandbox", "Wikipedia:Tutorial/Formatting/sandbox",
"Wikipedia:Tutorial/Wikipedia links/sandbox", "Wikipedia:Tutorial/Citing sources/sandbox", "Wikipedia:Tutorial/Keep in mind/sandbox")
pid = 0
 
def shut_off_check(page="Coal ball"):
Line 155 ⟶ 156:
for sandbox in sandboxes:
if should_be_reset(sandbox):
api.edit(sandbox, reset_text, "Clearing sandbox) (bot", True, True)
True)
else:
pid = os.fork() # You didn't see this....
Line 170:
os._exit(0) # Exit the child process (I think)
 
exceptif pid == 0: # this meanswill therebe wasTrue no need forif the bot todid not os.fork()
try:
pid # boring
except: # this means there was no need for the bot to os.fork()
api.logout()