mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fix for world.documenting issue.
This commit is contained in:
parent
03b183da7f
commit
848303c021
@ -296,8 +296,6 @@ class PeriodicFileDownloader(object):
|
|||||||
self.getFile(filename)
|
self.getFile(filename)
|
||||||
|
|
||||||
def _downloadFile(self, filename, url, f):
|
def _downloadFile(self, filename, url, f):
|
||||||
if world.documenting:
|
|
||||||
return
|
|
||||||
self.currentlyDownloading.add(filename)
|
self.currentlyDownloading.add(filename)
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@ -336,6 +334,8 @@ class PeriodicFileDownloader(object):
|
|||||||
self.currentlyDownloading.remove(filename)
|
self.currentlyDownloading.remove(filename)
|
||||||
|
|
||||||
def getFile(self, filename):
|
def getFile(self, filename):
|
||||||
|
if world.documenting:
|
||||||
|
return
|
||||||
(url, timeLimit, f) = self.periodicFiles[filename]
|
(url, timeLimit, f) = self.periodicFiles[filename]
|
||||||
if time.time() - self.lastDownloaded[filename] > timeLimit and \
|
if time.time() - self.lastDownloaded[filename] > timeLimit and \
|
||||||
filename not in self.currentlyDownloading:
|
filename not in self.currentlyDownloading:
|
||||||
|
@ -310,7 +310,12 @@ def genPlugins():
|
|||||||
moduleInfo = imp.find_module(pluginName,
|
moduleInfo = imp.find_module(pluginName,
|
||||||
conf.supybot.directories.plugins()
|
conf.supybot.directories.plugins()
|
||||||
)
|
)
|
||||||
module = imp.load_module(pluginName, *moduleInfo)
|
try:
|
||||||
|
module = imp.load_module(pluginName, *moduleInfo)
|
||||||
|
except Exception, e:
|
||||||
|
print 'Couldn\'t load %s: %s' % \
|
||||||
|
(pluginName, utils.exnToString(e))
|
||||||
|
continue
|
||||||
if not hasattr(module, 'Class'):
|
if not hasattr(module, 'Class'):
|
||||||
print '%s is not a plugin.' % filename
|
print '%s is not a plugin.' % filename
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user