소스 검색

Import rules properly.

tags/v0.1^2
Ben Kurtovic 12 년 전
부모
커밋
254060fb39
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. +5
    -2
      earwigbot/irc/watcher.py

+ 5
- 2
earwigbot/irc/watcher.py 파일 보기

@@ -88,8 +88,11 @@ class Watcher(IRCConnection):
# Set a default RC process hook that does nothing:
self._process_hook = lambda bot, rc: ()

path = os.path.join(self.bot.config.root_dir, "rules.py")
f, path, desc = imp.find_module("rules", [path])
path = self.bot.config.root_dir
try:
f, path, desc = imp.find_module("rules", [path])
except ImportError:
return
try:
module = imp.load_module(name, f, path, desc)
except Exception:


불러오는 중...
취소
저장