From 9332d43f7f65e876bb175c31d2d2e0aba755b6f2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 11 Dec 2011 18:20:49 +0100 Subject: closed #449 --- module/plugins/hooks/UpdateManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 46ca5cc4b..920a88060 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -21,7 +21,7 @@ import sys import re from os import stat -from os.path import join +from os.path import join, exists from time import time from module.ConfigParser import IGNORE @@ -180,7 +180,10 @@ class UpdateManager(Hook): root, type, name = m.__name__.rsplit(".", 2) id = (type, name) if type in self.core.pluginManager.plugins: - mtime = stat(m.__file__.replace(".pyc", ".py")).st_mtime + f = m.__file__.replace(".pyc", ".py") + if not exists(f): continue + + mtime = stat(f).st_mtime if id not in self.mtimes: self.mtimes[id] = mtime -- cgit v1.2.3