Skip to content

Commit

Permalink
added full urls in local log writing
Browse files Browse the repository at this point in the history
  • Loading branch information
notconfusing committed Sep 18, 2012
1 parent e1ac11a commit 0964964
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions viafbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,15 @@ def logOnWiki(casenum, validatedPage, viafnum):
wikipedia.Page(enwp,'User:VIAFbot/Conflict/13/' + str(archiveNum)).append(last100LogLinesAsString(conflict13log), comment='Logging', minorEdit=True, section=0)
else: pass
except exceptions.LockedPage:
viafbotrun.write(timestamp + validatedPage.title() + ' log page gave locked page error \n')
viafbotrun.write(timestamp + ' http://en.wikipedia.org/wiki/' + validatedPage.title() + ' log page gave locked page error \n')
except exceptions.PageNotSaved:
viafbotrun.write(timestamp + validatedPage.title() + ' log page gave page not saved error \n')
viafbotrun.write(timestamp + ' http://en.wikipedia.org/wiki/' + validatedPage.title() + ' log page gave page not saved error \n')
except exceptions.EditConflict:
viafbotrun.write(timestamp + validatedPage.title() + ' log page gave gave edit conflict error \n')
viafbotrun.write(timestamp + ' http://en.wikipedia.org/wiki/' + validatedPage.title() + ' log page gave gave edit conflict error \n')
except exceptions.SpamfilterError:
viafbotrun.write(timestamp + validatedPage.title() + ' log page gave spam filter error \n')
viafbotrun.write(timestamp + ' http://en.wikipedia.org/wiki/' + validatedPage.title() + ' log page gave spam filter error \n')
except exceptions.LongPageError:
viafbotrun.write(timestamp + validatedPage.title() + ' log page gave long page error \n')
viafbotrun.write(timestamp + ' http://en.wikipedia.org/wiki/' + validatedPage.title() + ' log page gave long page error \n')

def last100LogLinesAsString(logfile):
"""Retruns the last 100 (or remainder if log has less than 100 lines) of a log as string"""
Expand Down Expand Up @@ -458,7 +458,7 @@ def writeEntireTemplate(validatedPage, viafnum):
except exceptions.EditConflict:
raise exceptions.EditConflict
except exceptions.ServerError:
viafbotrun.write("writeEntireTemplate on page " + validatedPage.title() + ' gave generic server error.\n')
viafbotrun.write("writeEntireTemplate on page " + 'http://en.wikipedia.org/wiki/' + validatedPage.title() + ' gave generic server error.\n')
except exceptions.SpamfilterError:
raise exceptions.SpamfilterError
except exceptions.PageNotSaved:
Expand All @@ -481,7 +481,7 @@ def writeVIAFparamOnly2(validatedPage,viafnum):
except exceptions.EditConflict:
raise exceptions.EditConflict
except exceptions.ServerError:
viafbotrun.write("writeEntireTemplate on page " + validatedPage.title() + ' gave generic server error.\n')
viafbotrun.write("writeEntireTemplate on page " + 'http://en.wikipedia.org/wiki/' + validatedPage.title() + ' gave generic server error.\n')
except exceptions.SpamfilterError:
raise exceptions.SpamfilterError
except exceptions.PageNotSaved:
Expand Down Expand Up @@ -567,7 +567,7 @@ def writeStats():
try:
writeToWiki(validatedPage, acStatus, normdatenStatus, viafnum, writeAttempts=0)
except exceptions.Error:
viafbotrun.write(validatedPage.title() + " was not written to wiki because of ac and nd status were not valid")#write to log
viafbotrun.write('http://en.wikipedia.org/wiki/' + validatedPage.title() + " was not written to wiki because of ac and nd status were not valid")#write to log
'''Write statistics onwiki every so often'''
if (touched % 1000) == 0:
writeStats()
Expand Down

0 comments on commit 0964964

Please sign in to comment.